mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): accept grouped selectors for hr/section width checks (#59280)
Co-authored-by: Anna <a.rcottrill521@gmail.com>
This commit is contained in:
+12
-2
@@ -132,13 +132,23 @@ assert.isAtLeast(document.querySelectorAll('hr')?.length, 1);
|
||||
The width of your `hr` elements should be set using a percent value.
|
||||
|
||||
```js
|
||||
assert.isTrue(new __helpers.CSSHelp(document).getStyle('hr')?.width.endsWith('%'));
|
||||
assert.isTrue([...new __helpers.CSSHelp(document).getCSSRules().values()].some(rule =>
|
||||
rule.selectorText.split(',').some(selector =>
|
||||
selector.trim() === 'hr' &&
|
||||
rule.style.width?.endsWith('%')
|
||||
)
|
||||
));
|
||||
```
|
||||
|
||||
The width of your `section` elements should be set using a percent value.
|
||||
|
||||
```js
|
||||
assert.isTrue(new __helpers.CSSHelp(document).getStyle('section')?.width.endsWith('%'));
|
||||
assert.isTrue([...new __helpers.CSSHelp(document).getCSSRules().values()].some(rule =>
|
||||
rule.selectorText.split(',').some(selector =>
|
||||
selector.trim() === 'section' &&
|
||||
rule.style.width?.endsWith('%')
|
||||
)
|
||||
));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user