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:
parent
a24ae88b2e
commit
d39dd970b6
@ -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()));
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user