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
This commit is contained in:
Randell Dawson 2019-12-02 07:20:34 -08:00 committed by Parth Parth
parent a24ae88b2e
commit d39dd970b6

View File

@ -24,7 +24,7 @@ Set the <code>opacity</code> of the anchor tags to 0.7 using <code>links</code>
```yml
tests:
- text: Your code should set the <code>opacity</code> property to 0.7 on the anchor tags by selecting the class of <code>links</code>.
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()));
```