Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Commit

Permalink
fix(challenges): fix challenge for fallback value of CSS variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmaan authored and scissorsneedfoodtoo committed Jul 11, 2018
1 parent 5e41e74 commit 3abf7ad
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions challenges/01-responsive-web-design/basic-css.json
Original file line number Diff line number Diff line change
Expand Up @@ -5296,20 +5296,21 @@
"This will set background to black if there is a problem with your variable.",
"Note that this can be useful for debugging.",
"<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": [
{
"text":
"Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-top</code> class.",
"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":
"Apply the fallback value of <code>black</code> to the <code>background</code> property of the <code>penguin-bottom</code> class.",
"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": [],
Expand Down Expand Up @@ -5341,7 +5342,7 @@
" left: 25%;",
" ",
" /* change code below */",
" background: var(--penguin-skin);",
" background: var(--pengiun-skin);",
" /* change code above */",
" ",
" width: 50%;",
Expand All @@ -5354,7 +5355,7 @@
" left: 23.5%;",
" ",
" /* change code below */",
" background: var(--penguin-skin);",
" background: var(--pengiun-skin);",
" /* change code above */",
" ",
" width: 53%;",
Expand Down

0 comments on commit 3abf7ad

Please sign in to comment.