mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(learn): correct editable regions workshop-flexbox-photo-gallery (#65295)
This commit is contained in:
+3
-3
@@ -23,19 +23,19 @@ assert.match(code, /<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/)
|
||||
## --seed-contents--
|
||||
|
||||
```html
|
||||
--fcc-editable-region--
|
||||
<!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>
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
```css
|
||||
|
||||
+3
-2
@@ -42,7 +42,6 @@ assert.equal(document?.querySelector('.header')?.querySelector('h1')?.innerText,
|
||||
## --seed-contents--
|
||||
|
||||
```html
|
||||
--fcc-editable-region--
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
@@ -52,9 +51,11 @@ assert.equal(document?.querySelector('.header')?.querySelector('h1')?.innerText,
|
||||
<link rel="stylesheet" href="./styles.css">
|
||||
</head>
|
||||
<body>
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
```css
|
||||
|
||||
+3
-2
@@ -42,7 +42,6 @@ assert.lengthOf(document.querySelector('.gallery')?.querySelectorAll('img'), 9);
|
||||
## --seed-contents--
|
||||
|
||||
```html
|
||||
--fcc-editable-region--
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -55,9 +54,11 @@ assert.lengthOf(document.querySelector('.gallery')?.querySelectorAll('img'), 9);
|
||||
<header class="header">
|
||||
<h1>css flexbox photo gallery</h1>
|
||||
</header>
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
--fcc-editable-region--
|
||||
```
|
||||
|
||||
```css
|
||||
|
||||
+11
-11
@@ -89,19 +89,19 @@ assert.equal(document.querySelectorAll('img')?.[8]?.getAttribute('src'), 'https:
|
||||
<header class="header">
|
||||
<h1>css flexbox photo gallery</h1>
|
||||
</header>
|
||||
--fcc-editable-region--
|
||||
<div class="gallery">
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
</div>
|
||||
--fcc-editable-region--
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
<img>
|
||||
--fcc-editable-region--
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
+4
-2
@@ -80,11 +80,13 @@ body {
|
||||
border-bottom: 4px solid #fdb347;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
.gallery {
|
||||
display: flex;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
|
||||
+4
-2
@@ -73,12 +73,14 @@ body {
|
||||
border-bottom: 4px solid #fdb347;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
|
||||
.gallery {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
|
||||
+3
-2
@@ -71,13 +71,14 @@ body {
|
||||
border-bottom: 4px solid #fdb347;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
.gallery {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
|
||||
+3
-2
@@ -71,14 +71,15 @@ body {
|
||||
border-bottom: 4px solid #fdb347;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
.gallery {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
|
||||
+3
-2
@@ -86,15 +86,16 @@ body {
|
||||
border-bottom: 4px solid #fdb347;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
.gallery {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
|
||||
+3
-2
@@ -82,11 +82,12 @@ body {
|
||||
padding: 20px 10px;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
height: 300px;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
```
|
||||
|
||||
+3
-2
@@ -73,7 +73,6 @@ body {
|
||||
border-bottom: 4px solid #fdb347;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
.gallery {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -83,8 +82,10 @@ body {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 10px;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
|
||||
+3
-2
@@ -81,12 +81,13 @@ body {
|
||||
padding: 20px 10px;
|
||||
}
|
||||
|
||||
--fcc-editable-region--
|
||||
.gallery img {
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
height: 300px;
|
||||
object-fit: cover;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
|
||||
--fcc-editable-region--
|
||||
}
|
||||
```
|
||||
|
||||
+3
-3
@@ -56,11 +56,11 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing, 'border-b
|
||||
```
|
||||
|
||||
```css
|
||||
--fcc-editable-region--
|
||||
* {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
--fcc-editable-region--
|
||||
box-sizing: content-box;
|
||||
--fcc-editable-region--
|
||||
}
|
||||
|
||||
.gallery {
|
||||
border: 5px solid red;
|
||||
|
||||
Reference in New Issue
Block a user