fix (curriculum): Adding regex to disregard any whitespaces in the basic-css challenge (#38330)
* fix (curriculum): Adding regex to account for any whitespace that may be added to the code * Update curriculum/challenges/english/01-responsive-web-design/basic-css/use-attribute-selectors-to-style-elements.english.md Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
This commit is contained in:
parent
faf426bb40
commit
b0f85de311
@ -32,7 +32,7 @@ Using the <code>type</code> attribute selector, try to give the checkboxes in Ca
|
||||
```yml
|
||||
tests:
|
||||
- text: The <code>type</code> attribute selector should be used to select the checkboxes.
|
||||
testString: assert(code.match(/<style>[\s\S]*?\[type=("|')checkbox\1\]\s*?{[\s\S]*?}[\s\S]*?<\/style>/gi));
|
||||
testString: assert(code.match(/<style>[\s\S]*?\[\s*?type\s*?=\s*?("|')checkbox\1\s*?\]\s*?{[\s\S]*?}[\s\S]*?<\/style>/gi));
|
||||
- text: The top margins of the checkboxes should be 10px.
|
||||
testString: assert((function() {var count=0; $("[type='checkbox']").each(function() { if($(this).css('marginTop') === '10px') {count++;}});return (count===3)}()));
|
||||
- text: The bottom margins of the checkboxes should be 15px.
|
||||
|
Loading…
x
Reference in New Issue
Block a user