From d39dd970b65b1438a60bd61e122a5472b9a04975 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Mon, 2 Dec 2019 07:20:34 -0800 Subject: [PATCH] fix(curriculum): use regex to avoid differences in how browsers calculate style property values for Decrease Opacity of an Element challenge (#37838) * fix: use regex to avoid diff in browsers * fix: improve regex --- .../decrease-the-opacity-of-an-element.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/decrease-the-opacity-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/decrease-the-opacity-of-an-element.english.md index b0fb98571d..018998639b 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/decrease-the-opacity-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/decrease-the-opacity-of-an-element.english.md @@ -24,7 +24,7 @@ Set the opacity of the anchor tags to 0.7 using links ```yml tests: - text: Your code should set the opacity property to 0.7 on the anchor tags by selecting the class of links. - testString: assert(getComputedStyle($('.links')[0]).opacity == '0.7'); + testString: assert(/\.links\s*{([\s\S]*?;)*\s*opacity\s*:\s*0*\.70*\s*(;[\s\S]*?|\s*)}/.test($('style').text())); ```