feat: add solution code and enhance validation rules for basic selectors lesson
This commit is contained in:
@@ -193,6 +193,7 @@
|
|||||||
"initialCode": "",
|
"initialCode": "",
|
||||||
"codeSuffix": "",
|
"codeSuffix": "",
|
||||||
"previewContainer": "preview-area",
|
"previewContainer": "preview-area",
|
||||||
|
"solution": ".card.featured { border-color: gold; background-color: lemonchiffon }",
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"type": "regex",
|
"type": "regex",
|
||||||
@@ -215,6 +216,11 @@
|
|||||||
},
|
},
|
||||||
"message": "Set the border color to <kbd>gold</kbd>"
|
"message": "Set the border color to <kbd>gold</kbd>"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "regex",
|
||||||
|
"value": "\\.card\\.featured\\s*{[^}]*;",
|
||||||
|
"message": "Make sure to end your CSS rule with a semicolon <kbd>;</kbd>"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "contains",
|
"type": "contains",
|
||||||
"value": "background-color:",
|
"value": "background-color:",
|
||||||
|
|||||||
@@ -83,6 +83,10 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Code that appears after the editable area"
|
"description": "Code that appears after the editable area"
|
||||||
},
|
},
|
||||||
|
"solution": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Solution code for the lesson, if applicable"
|
||||||
|
},
|
||||||
"previewContainer": {
|
"previewContainer": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "ID of the container element for the preview"
|
"description": "ID of the container element for the preview"
|
||||||
|
|||||||
Reference in New Issue
Block a user