From e22adfcc6b2ae20faada58e37d160b866ef4181b Mon Sep 17 00:00:00 2001
From: Ollie <62644268+OllieClark33@users.noreply.github.com>
Date: Fri, 9 Oct 2020 19:09:33 +0100
Subject: [PATCH] fix(learn): Update the regex in Adjust the background-color
Property (#39907)
* fix: Updated the regex in background-color test
As mentioned by @Skye020 in issue #39823, I have made the semi-colon after the background-colour declaration optional, but only if it is the last declaration in the scope.
* Update curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-background-color-property-of-text.md
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
---
.../adjust-the-background-color-property-of-text.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-background-color-property-of-text.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-background-color-property-of-text.md
index 696c55c1d3..93d0aa908c 100644
--- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-background-color-property-of-text.md
+++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/adjust-the-background-color-property-of-text.md
@@ -26,7 +26,7 @@ Also for the h4
, remove the height
property and add background-color property to the h4
element set to rgba(45, 45, 45, 0.1)
.
- testString: assert(code.match(/(background-color|background):\s*?rgba\(\s*?45\s*?,\s*?45\s*?,\s*?45\s*?,\s*?0?\.1\s*?\);/gi));
+ testString: assert(/(background-color|background):rgba\(45,45,45,0?\.1\)(;?}|;)/gi.test(code.replace(/\s/g, '')));
- text: Your code should add a padding
property to the h4
element and set it to 10 pixels.
testString: assert($('h4').css('padding-top') == '10px' && $('h4').css('padding-right') == '10px' && $('h4').css('padding-bottom') == '10px' && $('h4').css('padding-left') == '10px');
- text: The height
property on the h4
element should be removed.