fix(curriculum): small fixes in recently updated challenges (#55421)

This commit is contained in:
yoko
2024-07-05 03:20:49 +09:00
committed by GitHub
parent 19aeb12699
commit 899075d930
5 changed files with 8 additions and 8 deletions
@@ -70,7 +70,7 @@ nav a {
Write a mixin named `shape` and give it 3 parameters: `$w`, `$h`, and `$bg-color`.
Use the `shape` mixin to give the `#square` element a width and height of `50px`, and the color `red`. For the `#rect-a` element add a width of `100px`, a height of `50px`, and the color `blue`. Finally, for the `#rect-b` element add a width of `50px`, a height of `100px`, and the color `orange`.
Use the `shape` mixin to give the `#square` element a width and height of `50px`, and the background color `red`. For the `#rect-a` element add a width of `100px`, a height of `50px`, and the background color `blue`. Finally, for the `#rect-b` element add a width of `50px`, a height of `100px`, and the background color `orange`.
# --hints--
@@ -98,19 +98,19 @@ Your mixin should include a `background-color` property that uses the `$bg-color
assert.match(__helpers.removeWhiteSpace(code), /background-color:\$bg\-color;/gi);
```
You should replace the styles inside the `#square` selector with a call to the `shape` mixin using the `@include` keyword. Setting a width and height of `50px`, and the color `red`.
You should replace the styles inside the `#square` selector with a call to the `shape` mixin using the `@include` keyword. Setting a width and height of `50px`, and the background color `red`.
```js
assert.match(code, /#square\s*{\s*@include\s+shape\(\s*50px,\s*50px,\s*red\s*\)\s*;\s*}/gi);
```
You should replace the styles inside the `#rect-a` selector with a call to the `shape` mixin using the `@include` keyword. Setting a width of `100px`, a height of `50px`, and the color `blue`.
You should replace the styles inside the `#rect-a` selector with a call to the `shape` mixin using the `@include` keyword. Setting a width of `100px`, a height of `50px`, and the background color `blue`.
```js
assert.match(code, /#rect-a\s*{\s*@include\s+shape\(\s*100px,\s*50px,\s*blue\s*\)\s*;\s*}/gi);
```
You should replace the styles inside the `#rect-b` selector with a call to the `shape` mixin using the `@include` keyword. Setting a width of `50px`, a height of `100px`, and the color `orange`.
You should replace the styles inside the `#rect-b` selector with a call to the `shape` mixin using the `@include` keyword. Setting a width of `50px`, a height of `100px`, and the background color `orange`.
```js
assert.match(code, /#rect-b\s*{\s*@include\s+shape\(\s*50px,\s*100px,\s*orange\s*\)\s*;\s*}/gi);
@@ -7,7 +7,7 @@ dashedName: step-7
# --description--
You can add images to your website by using the `img` element. `img` elements have an opening tag without a closing tag. A tag for an element without a closing tag is known as a <dfn>void element</dfn>.
You can add images to your website by using the `img` element. `img` elements have an opening tag without a closing tag. An element without a closing tag is known as a <dfn>void element</dfn>.
Add an `img` element below the `p` element. At this point, no image will show up in the browser.
@@ -11,7 +11,7 @@ Now you will learn a CSS trick to draw triangles.
This will be used to draw ears on the cat.
Using a class selector, give the `.cat-right-ear` element `height` and `width` properties set to `100px`. Set the `background-color` to white. Set the left and right borders to `35px solid blue`. Set the top and bottom borders to `35px solid red`.
Using a class selector, give the `.cat-right-ear` element `height` and `width` properties set to `100px`. Set the `background-color` to `white`. Set the left and right borders to `35px solid blue`. Set the top and bottom borders to `35px solid red`.
# --hints--
@@ -9,7 +9,7 @@ dashedName: step-11
The next position property is `absolute`. When you use the `absolute` value for your `position` property, the element is taken out of the normal flow of the document, and then its position is determined by the `top`, `right`, `bottom`, and `left` properties.
Set the position property of your `.cat-head` element to `absolute`, then set `top` and `left` properties to any positive pixel value.
Set the `position` property of your `.cat-head` element to `absolute`, then set `top` and `left` properties to any positive pixel value.
<!-- **Note**: You can experiment with `top`, `left`, `bottom`, and `right` properties here, but the test would only pass for `top` of `300px`, and left of `400px`. -->
@@ -16,7 +16,7 @@ Using a class selector, give the `.cat-left-ear` element a left and right border
# --hints--
Your `.cat-right-ear` selector not should have a `height` property.
Your `.cat-right-ear` selector should not have a `height` property.
```js
assert(!new __helpers.CSSHelp(document).getStyle('.cat-right-ear')?.height)