fix(challenges): allow for omitted unit after zero values
ISSUES CLOSED: #166
This commit is contained in:
committed by
Kristofer Koishigawa
parent
fd8c9e469c
commit
45b573b57c
@ -2237,7 +2237,7 @@
|
|||||||
{
|
{
|
||||||
"text": "The color stop at 0 pixels should be <code>yellow</code>.",
|
"text": "The color stop at 0 pixels should be <code>yellow</code>.",
|
||||||
"testString":
|
"testString":
|
||||||
"assert(code.match(/yellow\\s+?0px/gi), 'The color stop at 0 pixels should be <code>yellow</code>.');"
|
"assert(code.match(/yellow\\s+?0(px)?/gi), 'The color stop at 0 pixels should be <code>yellow</code>.');"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "One color stop at 40 pixels should be <code>yellow</code>.",
|
"text": "One color stop at 40 pixels should be <code>yellow</code>.",
|
||||||
@ -2925,7 +2925,7 @@
|
|||||||
"text":
|
"text":
|
||||||
"The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.",
|
"The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.",
|
||||||
"testString":
|
"testString":
|
||||||
"assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?top:\\s*?0px;\\s*?left:\\s*?0px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.');"
|
"assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?top:\\s*?0(px)?;\\s*?left:\\s*?0(px)?;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.');"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text":
|
"text":
|
||||||
@ -2937,7 +2937,7 @@
|
|||||||
"text":
|
"text":
|
||||||
"The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.",
|
"The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.",
|
||||||
"testString":
|
"testString":
|
||||||
"assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?top:\\s*?0px;\\s*?left:\\s*?-25px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.');"
|
"assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?top:\\s*?0(px)?;\\s*?left:\\s*?-25px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.');"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"solutions": [],
|
"solutions": [],
|
||||||
|
Reference in New Issue
Block a user