mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): better wording (#60040)
This commit is contained in:
parent
678dc4334e
commit
0f69170faf
@ -15,8 +15,8 @@ In this lab, you'll practice how to style backgrounds and borders by creating a
|
||||
**User Stories:**
|
||||
|
||||
1. You should have a `div` element with a class of `blog-post-card` to hold all of your card elements.
|
||||
2. Within the `.blog-post-card` `div` element, you should have an image element with a valid `alt` attribute and text, and a class of `post-img`. You can use `https://cdn.freecodecamp.org/curriculum/labs/cover-photo.jpg` for the `src` attribute of the image.
|
||||
3. You should have a `div` with a class of `post-content` within the `.blog-post-card` `div` element with the following:
|
||||
2. Within the `.blog-post-card` element, you should have an image element with a valid `alt` attribute and text, and a class of `post-img`. You can use `https://cdn.freecodecamp.org/curriculum/labs/cover-photo.jpg` for the `src` attribute of the image.
|
||||
3. You should have a `div` with a class of `post-content` within the `.blog-post-card` element with the following:
|
||||
- An `h2` element with a class of `post-title` and text for the title of your blog post.
|
||||
- A `p` element with a class of `post-excerpt` and text to summarize your blog post.
|
||||
- An `a` element with a class of `read-more` with the text `Read More`.
|
||||
|
||||
@ -536,7 +536,7 @@ showLatestPosts(data);
|
||||
assert.lengthOf(pContainer.querySelectorAll('tr'), 2);
|
||||
```
|
||||
|
||||
Each `tr` element from the string returned by `showLatestPosts` should contain `5` `td` elements.
|
||||
Each `tr` element from the string returned by `showLatestPosts` should contain 5 `td` elements.
|
||||
|
||||
```js
|
||||
const data = {
|
||||
|
||||
@ -14,11 +14,11 @@ Fulfill the user stories below and get all the tests to pass to complete the lab
|
||||
|
||||
**User Stories:**
|
||||
|
||||
1. You should have a `#house` `div`.
|
||||
1. You should have a `div` with an `id` of `house`.
|
||||
1. Your `#house` should have a `position` set to `relative` so its children can be positioned with respect to it.
|
||||
1. Your `#house` should have a width of `500px` and a height of `400px`.
|
||||
1. Your `#house` should have a background color and a border set.
|
||||
1. You should have a `#chimney`, `#roof`, `#window-1`, `#window-2`, and `#door` `div`s within the `#house`.
|
||||
1. You should have five `div` elements inside `#house` with the following `id` values: `chimney`, `roof`, `window-1`, `window-2`, and `door`.
|
||||
1. All of the immediate children of the `#house` should have a `position` of `absolute`.
|
||||
1. `#roof`, `#chimney`, `#window-1`, `#window-2`, and `#door` should have a width, height, border, and background color set.
|
||||
1. Your `#roof` should have a top value of `0`.
|
||||
@ -32,7 +32,7 @@ Fulfill the user stories below and get all the tests to pass to complete the lab
|
||||
|
||||
# --hints--
|
||||
|
||||
You should have a `#house` `div`.
|
||||
You should have a `div` with an `id` of `house`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector("div#house"));
|
||||
@ -68,7 +68,7 @@ You should target `#house` and set its height to `400px`.
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('#house')?.getPropertyValue("height"), "400px")
|
||||
```
|
||||
|
||||
You should have a `#chimney` `div` within the `#house`.
|
||||
You should have a `div` with an `id` of `chimney` within the `#house`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector("div#house div#chimney"));
|
||||
@ -104,7 +104,7 @@ You should target `#chimney` and set its `background-color` property.
|
||||
assert.isNotEmpty(new __helpers.CSSHelp(document).getStyle("#chimney")?.getPropertyValue("background-color"));
|
||||
```
|
||||
|
||||
You should have a `#roof` `div` within the `#house`.
|
||||
You should have a `div` with an `id` of `roof` within the `#house`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector("div#house div#roof"));
|
||||
@ -140,7 +140,7 @@ You should target `#roof` and set its `background-color` property.
|
||||
assert.isNotEmpty(new __helpers.CSSHelp(document).getStyle("#roof")?.getPropertyValue("background-color"));
|
||||
```
|
||||
|
||||
You should have a `#window-1` `div` within the `#house`.
|
||||
You should have a `div` with an `id` of `window-1` within the `#house`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector("div#house div#window-1"));
|
||||
@ -184,7 +184,7 @@ const windows = new __helpers.CSSHelp(document).getStyle("#window-1, #window-2")
|
||||
assert.isNotEmpty(window1 || windows);
|
||||
```
|
||||
|
||||
You should have a `#window-2` `div` within the `#house`.
|
||||
You should have a `div` with an `id` of `window-2` within the `#house`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector("div#house div#window-2"));
|
||||
@ -228,7 +228,7 @@ const windows = new __helpers.CSSHelp(document).getStyle("#window-1, #window-2")
|
||||
assert.isNotEmpty(window2 || windows);
|
||||
```
|
||||
|
||||
You should have a `#door` `div` within the `#house`.
|
||||
You should have a `div` with an `id` of `door` within the `#house`.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector("div#house div#door"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user