From 4d024f3e4bcbb0a0016e6a6bce01619c25e54dbc Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Fri, 21 May 2021 13:18:42 +0200 Subject: [PATCH] fix(curriculum): css and html test issues (#42045) * fix: css and html issues * fix: issues with css test * fix: allow spaces in solution css * fix: css tests for use-rgb-to-mix-colors --- .../applied-visual-design/adjust-the-hue-of-a-color.md | 6 +++--- .../basic-css/give-a-background-color-to-a-div-element.md | 2 +- .../basic-css/prioritize-one-style-over-another.md | 2 +- .../basic-css/size-your-images.md | 4 ++-- .../basic-css/specify-how-fonts-should-degrade.md | 2 +- .../understand-absolute-versus-relative-units.md | 2 +- .../basic-css/use-a-css-class-to-style-an-element.md | 2 +- .../basic-css/use-abbreviated-hex-code.md | 8 ++++---- .../basic-css/use-hex-code-to-mix-colors.md | 8 ++++---- .../basic-css/use-rgb-to-mix-colors.md | 8 ++++---- .../sass/store-data-with-sass-variables.md | 4 ++-- .../add-a-hover-effect-to-a-d3-element.md | 2 +- .../data-visualization-with-d3/add-classes-with-d3.md | 2 +- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-hue-of-a-color.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-hue-of-a-color.md index 3ff06f2003..9af8149dca 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-hue-of-a-color.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-hue-of-a-color.md @@ -30,19 +30,19 @@ Change the `background-color` of each `div` element based on the class names (`g Your code should use the `hsl()` property to declare the color `green`. ```js -assert(code.match(/\.green\s*?{\s*?background-color:\s*?hsl/gi)); +assert(code.match(/\.green\s*?{\s*?background-color\s*:\s*?hsl/gi)); ``` Your code should use the `hsl()` property to declare the color `cyan`. ```js -assert(code.match(/\.cyan\s*?{\s*?background-color:\s*?hsl/gi)); +assert(code.match(/\.cyan\s*?{\s*?background-color\s*:\s*?hsl/gi)); ``` Your code should use the `hsl()` property to declare the color `blue`. ```js -assert(code.match(/\.blue\s*?{\s*?background-color:\s*?hsl/gi)); +assert(code.match(/\.blue\s*?{\s*?background-color\s*:\s*?hsl/gi)); ``` The `div` element with class `green` should have a `background-color` of green. diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.md index d38ed600e5..9b29ee1a86 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.md @@ -40,7 +40,7 @@ assert($('div').css('background-color') === 'rgb(192, 192, 192)'); A class named `silver-background` should be defined within the `style` element and the value of `silver` should be assigned to the `background-color` property. ```js -assert(code.match(/\.silver-background\s*{\s*background-color:\s*silver;\s*}/)); +assert(code.match(/\.silver-background\s*{\s*background-color\s*:\s*silver\s*;?\s*}/)); ``` # --seed-- diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.md index 780c3a770f..2f040b7d6a 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.md @@ -32,7 +32,7 @@ assert($('h1').hasClass('pink-text')); Your `