-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(curriculum): implement a lesson about the box-sizing property (#5…
…0795) Co-authored-by: Moshe <shootermv@gmail.com> Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com> Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com> Co-authored-by: jdwilkin4 <jwilkin4@hotmail.com>
- Loading branch information
1 parent
18f7e74
commit 578d162
Showing
69 changed files
with
1,259 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61537485c4f2a624f18d7794.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: 61537485c4f2a624f18d7794 | ||
title: 步骤 1 | ||
title: Step 1 | ||
challengeType: 0 | ||
dashedName: step-1 | ||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61537a8054753e2f1f2a1574.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: 61537a8054753e2f1f2a1574 | ||
title: 步骤 2 | ||
title: Step 2 | ||
challengeType: 0 | ||
dashedName: step-2 | ||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61537bb9b1a29430ac15ad38.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: 61537bb9b1a29430ac15ad38 | ||
title: 步骤 3 | ||
title: Step 3 | ||
challengeType: 0 | ||
dashedName: step-3 | ||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61537c5f81f0cf325b4a854c.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: 61537c5f81f0cf325b4a854c | ||
title: 步骤 4 | ||
title: Step 4 | ||
challengeType: 0 | ||
dashedName: step-4 | ||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61537c9eecea6a335db6da79.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: 61537c9eecea6a335db6da79 | ||
title: 步骤 5 | ||
title: Step 5 | ||
challengeType: 0 | ||
dashedName: step-5 | ||
--- | ||
|
2 changes: 1 addition & 1 deletion
2
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61537d86bdc3dd343688fceb.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: 61537d86bdc3dd343688fceb | ||
title: 步骤 6 | ||
title: Step 6 | ||
challengeType: 0 | ||
dashedName: step-6 | ||
--- | ||
|
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/615380dff67172357fcf0425.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153893900438b4643590367.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153897c27f6334716ee5abe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/615389bd81347947ea7ba896.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153908a366afb4d57185c8d.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/615392916d83fa4f02f7e2cf.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153938dce8b294ff8f5a4e9.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153947986535e5117e60615.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61539e07e7430b528fbffe21.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/61539f32a206bd53ec116465.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153a04847abee57a3a406ac.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153a3485f0b20591d26d2a1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153a3952facd25a83fe8083.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6153a3ebb4f7f05b8401b716.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/615f171d05def3218035dc85.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
...gn-22/learn-css-flexbox-by-building-a-photo-gallery/6493bc0d99879635209565aa.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
id: 6493bc0d99879635209565aa | ||
title: Step 9 | ||
challengeType: 0 | ||
dashedName: step-9 | ||
--- | ||
|
||
# --description-- | ||
|
||
The `border-box` sizing model does the opposite of `content-box`. The total width of the element, including padding and border, will be the explicit width set. The content of the element will shrink to make room for the padding and border. | ||
|
||
Change the `box-sizing` property to `border-box`. Notice how your blue image borders now fit within your red gallery border. | ||
|
||
# --hints-- | ||
|
||
|
||
Your * selector should have a `box-sizing` property set to `border-box` as the value. | ||
|
||
```js | ||
assert.equal(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing, 'border-box'); | ||
``` | ||
# --seed-- | ||
## --seed-contents-- | ||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Photo Gallery</title> | ||
<link rel="stylesheet" href="./styles.css"> | ||
</head> | ||
<body> | ||
<header class="header"> | ||
<h1>css flexbox photo gallery</h1> | ||
</header> | ||
<div class="gallery"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/2.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/3.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/4.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/5.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/6.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/7.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/8.jpg"> | ||
<img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/9.jpg"> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
|
||
``` | ||
```css | ||
--fcc-editable-region-- | ||
* { | ||
box-sizing: content-box; | ||
} | ||
--fcc-editable-region-- | ||
|
||
.gallery { | ||
border: 5px solid red; | ||
width: 50%; | ||
} | ||
|
||
img { | ||
width: 100%; | ||
border: 5px solid blue; | ||
padding: 5px; | ||
} | ||
``` |
Oops, something went wrong.