fix(challenges): fix challenge for fallback value of CSS variable
This commit is contained in:
committed by
Kristofer Koishigawa
parent
5e41e744a5
commit
3abf7adce5
@ -5296,20 +5296,21 @@
|
|||||||
"This will set background to black if there is a problem with your variable.",
|
"This will set background to black if there is a problem with your variable.",
|
||||||
"Note that this can be useful for debugging.",
|
"Note that this can be useful for debugging.",
|
||||||
"<hr>",
|
"<hr>",
|
||||||
"Add a fallback value of <code>black</code> to the <code>background</code> property of <code>penguin-top</code> and <code>penguin-bottom</code> classes. This style will be applied because of a typo in the variable name."
|
"Add a fallback value of <code>black</code> to the <code>background</code> property of <code>penguin-top</code> and <code>penguin-bottom</code> classes.",
|
||||||
|
"<strong>Note</strong>: The above style will be applied because of a typo in the CSS variable name."
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
{
|
{
|
||||||
"text":
|
"text":
|
||||||
"Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-top</code> class.",
|
"Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-top</code> class.",
|
||||||
"testString":
|
"testString":
|
||||||
"assert(code.match(/.penguin-top\\s*?{[\\s\\S]*background\\s*?:\\s*?var\\(\\s*?--penguin-skin\\s*?,\\s*?black\\s*?\\)\\s*?;[\\s\\S]*}[\\s\\S]*.penguin-bottom\\s{/gi), 'Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-top</code> class.');"
|
"assert(code.match(/.penguin-top\\s*?{[\\s\\S]*background\\s*?:\\s*?var\\(\\s*?--pengiun-skin\\s*?,\\s*?black\\s*?\\)\\s*?;[\\s\\S]*}[\\s\\S]*.penguin-bottom\\s{/gi), 'Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-top</code> class.');"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text":
|
"text":
|
||||||
"Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-bottom</code> class.",
|
"Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-bottom</code> class.",
|
||||||
"testString":
|
"testString":
|
||||||
"assert(code.match(/.penguin-bottom\\s*?{[\\s\\S]*background\\s*?:\\s*?var\\(\\s*?--penguin-skin\\s*?,\\s*?black\\s*?\\)\\s*?;[\\s\\S]*}/gi), 'Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-bottom</code> class.');"
|
"assert(code.match(/.penguin-bottom\\s*?{[\\s\\S]*background\\s*?:\\s*?var\\(\\s*?--pengiun-skin\\s*?,\\s*?black\\s*?\\)\\s*?;[\\s\\S]*}/gi), 'Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-bottom</code> class.');"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"solutions": [],
|
"solutions": [],
|
||||||
@ -5341,7 +5342,7 @@
|
|||||||
" left: 25%;",
|
" left: 25%;",
|
||||||
" ",
|
" ",
|
||||||
" /* change code below */",
|
" /* change code below */",
|
||||||
" background: var(--penguin-skin);",
|
" background: var(--pengiun-skin);",
|
||||||
" /* change code above */",
|
" /* change code above */",
|
||||||
" ",
|
" ",
|
||||||
" width: 50%;",
|
" width: 50%;",
|
||||||
@ -5354,7 +5355,7 @@
|
|||||||
" left: 23.5%;",
|
" left: 23.5%;",
|
||||||
" ",
|
" ",
|
||||||
" /* change code below */",
|
" /* change code below */",
|
||||||
" background: var(--penguin-skin);",
|
" background: var(--pengiun-skin);",
|
||||||
" /* change code above */",
|
" /* change code above */",
|
||||||
" ",
|
" ",
|
||||||
" width: 53%;",
|
" width: 53%;",
|
||||||
|
Reference in New Issue
Block a user