mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-08 09:00:38 -04:00
fix(curriculum): use get computed styles in step 46 of the access quiz (#54146)
This commit is contained in:
@@ -16,13 +16,15 @@ Change the font color of all the anchor elements within the list elements to som
|
||||
You should use the `li > a` selector.
|
||||
|
||||
```js
|
||||
assert.exists(new __helpers.CSSHelp(document).getStyle('li > a'));
|
||||
const anchors = document.querySelectorAll('li > a');
|
||||
anchors.forEach(a => assert.exists(getComputedStyle(a)));
|
||||
```
|
||||
|
||||
You should give the `a` element a `color` property.
|
||||
|
||||
```js
|
||||
assert.notEmpty(new __helpers.CSSHelp(document).getStyle('li > a')?.color);
|
||||
const anchors = document.querySelectorAll('li > a');
|
||||
anchors.forEach(a => assert.notEmpty(getComputedStyle(a)?.color));
|
||||
```
|
||||
|
||||
You should give the `color` property a contrast with the background of at least 7:1. _Hint: I would use `#dfdfe2`_
|
||||
|
||||
Reference in New Issue
Block a user