mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): use code instead of editableContents for cafe menu CSS checks (#66027)
This commit is contained in:
+2
-2
@@ -18,13 +18,13 @@ Start by rewriting the styles you have created into the `styles.css` file. Make
|
||||
Your `styles.css` file should have the `h1, h2, p` type selector.
|
||||
|
||||
```js
|
||||
assert(editableContents.replace(/[\s\n]*/g, "").match(/(h1|h2|p),(h1|h2|p),(h1|h2|p){/));
|
||||
assert(code.slice(code.indexOf('</html>')).replace(/[\s\n]*/g, "").match(__helpers.concatRegex(__helpers.permutateRegex(['h1', 'h2', 'p'], { elementsSeparator: ',' }), /{/)));
|
||||
```
|
||||
|
||||
Your selector should set the `text-align` property to `center`.
|
||||
|
||||
```js
|
||||
assert(editableContents.match(/text-align:\s*center;?/));
|
||||
assert(code.slice(code.indexOf('</html>')).match(/text-align:\s*center;?/));
|
||||
```
|
||||
|
||||
Your code should not contain the `<style>` tags.
|
||||
|
||||
@@ -18,13 +18,13 @@ Start by rewriting the styles you have created into the `styles.css` file. Make
|
||||
Your `styles.css` file should have the `h1, h2, p` type selector.
|
||||
|
||||
```js
|
||||
assert.match(editableContents.replace(/[\s\n]*/g, ""), /(h1|h2|p),(h1|h2|p),(h1|h2|p){/);
|
||||
assert.match(code.slice(code.indexOf('</html>')).replace(/[\s\n]*/g, ""), __helpers.concatRegex(__helpers.permutateRegex(['h1', 'h2', 'p'], { elementsSeparator: ',' }), /{/));
|
||||
```
|
||||
|
||||
Your selector should set the `text-align` property to `center`.
|
||||
|
||||
```js
|
||||
assert.match(editableContents, /text-align:\s*center;?/);
|
||||
assert.match(code.slice(code.indexOf('</html>')), /text-align:\s*center;?/);
|
||||
```
|
||||
|
||||
Your code should not contain the `<style>` tags.
|
||||
|
||||
Reference in New Issue
Block a user