fix(curriculum): Allow leading to zero before decimal point to be optional for opacity value (#37715)

* fix: allow-leading-zero-to-be-optional-before-decimal-point-for-opacity

* fix: use getComputedStyle intead of regex

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
Randell Dawson
2019-11-13 12:39:03 -08:00
committed by Tom
parent 376b42637a
commit 55f95c2f74

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(/\.links\s*\{[^}]+opacity\s*:\s*0.7;/.test(code));
testString: assert(getComputedStyle($('.links')[0]).opacity == '0.7');
```