Skip to content

Commit 2d5e13f

Browse files
authored
fix(curriculum): add missing information for css grid review (freeCodeCamp#58457)
1 parent 5eb5b99 commit 2d5e13f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

curriculum/challenges/english/25-front-end-development/review-css-grid/671a99394bedfb9a5bc687c4.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,39 @@ Review the concepts below to prepare for the upcoming quiz.
2121

2222
- **The `fr` (Fractional) Unit**: This unit represents a fraction of the space within the grid container. You can use the `fr` unit to create flexible grids.
2323
- **Creating Gaps Between Tracks**: There are three ways to create gaps between tracks in CSS grid. You can use the `column-gap` property to create gaps between columns. You can use the `row-gap` property to create gaps between rows. Or you can use the `gap` shorthand property to create gaps between both rows and columns.
24+
- **`grid-template-columns`**: This is used to set lines names and sizing for the grid track columns.
25+
26+
```css
27+
.container {
28+
display: grid;
29+
width: 100%;
30+
grid-template-columns: 30px 1fr;
31+
}
32+
```
33+
34+
- **`grid-template-rows`**: This is used to set lines names and sizing for the grid track rows.
35+
- **`grid-auto-flow`**: The determines how auto placed items fit in the grid.
36+
37+
```css
38+
.container {
39+
display: grid;
40+
width: 100%;
41+
grid-auto-flow: column;
42+
}
43+
```
44+
45+
- **`grid-auto-columns`**: This is used to set the size for columns created implicitly.
46+
47+
```css
48+
.container {
49+
display: grid;
50+
width: 100%;
51+
grid-auto-columns: auto;
52+
}
53+
```
54+
55+
- **`place-items`**: This is used to align items for both block and inline directions.
56+
- **`align-items`**: This is used to set the alignment for the items in a grid container.
2457
- **`repeat()` Function**: This function is used to repeat sections in the track listing. Instead of writing `grid-template-columns: 1fr 1fr 1fr;` you can use the `repeat()` function instead.
2558

2659
```css
@@ -43,6 +76,15 @@ Review the concepts below to prepare for the upcoming quiz.
4376
```
4477

4578
- **Line-based Placement**: All grids have lines. To specify where the item begins on a line, you can use the `grid-column-start` and `grid-row-start` properties. To specify where the item ends on the line, you can use the `grid-column-end` and `grid-row-end` properties. You can also choose to use the `grid-column` or `grid-row` shorthand properties instead.
79+
80+
Here is an example of using the `grid-column` property to make an element stretch across all columns.
81+
82+
```css
83+
.element {
84+
grid-column: 1 / -1;
85+
}
86+
```
87+
4688
- **`grid-template-areas`**: The property is used to provide a name for the items you are going to position on the grid.
4789

4890
```html
@@ -94,6 +136,12 @@ Review the concepts below to prepare for the upcoming quiz.
94136
}
95137
```
96138

139+
## Debugging CSS
140+
141+
- **DevTools (Developer Tools)**: DevTools allow you to inspect and modify your CSS in real-time. The Styles pane shows all the CSS rules applied to the selected element, including inherited styles. You can toggle individual properties on and off, edit values, and even add new rules directly in the browser. This immediate feedback is incredibly useful for experimenting with different styles without modifying your source code.
142+
- **CSS Validators**: Validators are used to check your CSS against the official specifications and reports any errors or warnings. A popular validator you can use is the W3C CSS Validator.
143+
- **Debugging Responsive Designs**: The DevTools has an option to allow you to simulate how your site looks on various screen sizes and devices. This can help you identify breakpoint issues or styles that don't scale well across different viewport sizes.
144+
97145
# --assignment--
98146

99147
Review the CSS Grid topics and concepts.

0 commit comments

Comments
 (0)