fix(curriculum): use getComputedStyle to check css value (#48240)

* fix(bug): use getComputedStyle to check css value

* Update curriculum/challenges/english/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
Atir Nayab
2022-10-27 12:44:42 +05:30
committed by GitHub
parent f9a8e11de6
commit f45cd6543c

View File

@@ -31,9 +31,10 @@ assert.equal(display, 'inline-block');
You should give the `label` element a `text-align` of `right`.
```js
const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.textAlign;
const textAlign = gs('.info > label') ?? gs('.info label');
assert.equal(textAlign, 'right');
const v = (el) => getComputedStyle(el).getPropertyValue('text-align');
document.querySelectorAll('.info label').forEach(el => {
assert.equal(v(el), 'right');
});
```
# --seed--