Merge pull request #15679 from Manish-Giri/fix/allow-shorthand-hex-values
Allow shorthand Hex values in challengepull/15744/head
commit
b5f4924e6b
|
@ -1587,7 +1587,8 @@
|
||||||
"Example:",
|
"Example:",
|
||||||
"<code>background: linear-gradient(90deg, red, yellow, rgb(204, 204, 255));</code>",
|
"<code>background: linear-gradient(90deg, red, yellow, rgb(204, 204, 255));</code>",
|
||||||
"<hr>",
|
"<hr>",
|
||||||
"Use a <code>linear-gradient()</code> for the <code>div</code> element's <code>background</code>, and set it from a direction of 35 degrees to change the color from <code>#CCFFFF</code> to <code>#FFCCCC</code>."
|
"Use a <code>linear-gradient()</code> for the <code>div</code> element's <code>background</code>, and set it from a direction of 35 degrees to change the color from <code>#CCFFFF</code> to <code>#FFCCCC</code>.",
|
||||||
|
"<strong>Note</strong><br>While there are other ways to specify a color value, like <code>rgb()</code> or <code>hsl()</code>, use hex values for this challenge."
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<style>",
|
"<style>",
|
||||||
|
@ -1596,7 +1597,7 @@
|
||||||
" border-radius: 20px;",
|
" border-radius: 20px;",
|
||||||
" width: 70%;",
|
" width: 70%;",
|
||||||
" height: 400px;",
|
" height: 400px;",
|
||||||
" margin: 50 auto;",
|
" margin: 50px auto;",
|
||||||
" ",
|
" ",
|
||||||
" }",
|
" }",
|
||||||
"",
|
"",
|
||||||
|
@ -1605,7 +1606,7 @@
|
||||||
"<div></div>"
|
"<div></div>"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(code.match(/background:\\s*?linear-gradient\\(35deg,\\s*?#CCFFFF,\\s*?#FFCCCC\\);/gi), 'message: The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.');"
|
"assert(code.match(/background:\\s*?linear-gradient\\(35deg,\\s*?(#CCFFFF|#CFF),\\s*?(#FFCCCC|#FCC)\\);/gi), 'message: The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.');"
|
||||||
],
|
],
|
||||||
"solutions": [],
|
"solutions": [],
|
||||||
"hints": [],
|
"hints": [],
|
||||||
|
|
Loading…
Reference in New Issue