mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): check only margin-left is set (#55584)
This commit is contained in:
+10
-3
@@ -14,13 +14,20 @@ Create a new `.indent` selector and give it a `margin-left` property set to `1em
|
||||
You should have a new `.indent` selector.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.indent'));
|
||||
assert.isNotNull(new __helpers.CSSHelp(document).getStyle('.indent'));
|
||||
```
|
||||
|
||||
Your new `.indent` selector should have a `margin-left` property set to `1em`.
|
||||
Your `.indent` selector should have a `margin-left` property set to `1em`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em');
|
||||
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft, '1em');
|
||||
```
|
||||
|
||||
Your `.indent` selector should only set the `margin-left` property, not other margin properties.
|
||||
|
||||
```js
|
||||
const { marginTop, marginRight, marginBottom } = new __helpers.CSSHelp(document).getStyle('.indent') ?? {};
|
||||
assert.isTrue([marginTop, marginRight, marginBottom].every(prop => prop === ''));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
+9
-2
@@ -14,13 +14,20 @@ Create a `.double-indent` selector and give it a left margin of `2em`.
|
||||
You should have a new `.double-indent` selector.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.double-indent'));
|
||||
assert.isNotNull(new __helpers.CSSHelp(document).getStyle('.double-indent'));
|
||||
```
|
||||
|
||||
Your `.double-indent` selector should have a `margin-left` property set to `2em`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em');
|
||||
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft, '2em');
|
||||
```
|
||||
|
||||
Your `.double-indent` selector should only set the `margin-left` property, not other margin properties.
|
||||
|
||||
```js
|
||||
const { marginTop, marginRight, marginBottom } = new __helpers.CSSHelp(document).getStyle('.double-indent') ?? {};
|
||||
assert.isTrue([marginTop, marginRight, marginBottom].every(prop => prop === ''));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user