From f45cd6543cf53e924a3812d5cf7ffe3d1e4d178e Mon Sep 17 00:00:00 2001 From: Atir Nayab <91016903+nayabatir1@users.noreply.github.com> Date: Thu, 27 Oct 2022 12:44:42 +0530 Subject: [PATCH] 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 Co-authored-by: Shaun Hamilton --- .../6148da157cc0bd0d06df5c0a.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md index fbe04c14bbc..778567c20b3 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md @@ -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--