Skip to content

Commit a0473b7

Browse files
authored
feat(curriculum): adding content for css absolute and review units review page (freeCodeCamp#57035)
1 parent dd7906d commit a0473b7

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

client/i18n/locales/english/intro.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,8 @@
19501950
"review-css-relative-and-absolute-units": {
19511951
"title": "CSS Relative and Absolute Units Review",
19521952
"intro": [
1953-
"Review the CSS Relative and Absolute Units concepts to prepare for the upcoming quiz."
1953+
"Before you are quizzed on relative and absolute units, you first need to review.",
1954+
"Open up this page to review concepts like percentages, <code>px</code>, <code>rem</code>, <code>em</code>, and more."
19541955
]
19551956
},
19561957
"quiz-css-relative-and-absolute-units": {

curriculum/challenges/english/25-front-end-development/review-css-relative-and-absolute-units/671a8f8350c20a7439015c98.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,27 @@ dashedName: review-css-relative-and-absolute-units
99

1010
Review the concepts below to prepare for the upcoming quiz.
1111

12+
## Absolute Units
1213

14+
- **`px` (Pixels)**: This absolute unit is a fixed-size unit of measurement in CSS, providing precise control over dimensions. This means that 1px is always equal to 1/96th of an inch.
15+
- **`in` (Inch)**: This absolute unit is equal to 96px.
16+
- **`cm` (Centimeters)**: This absolute unit is equal to 25.2/64 of an inch.
17+
- **`mm` (Millimeters)**: This absolute unit is equal to 1/10th of a centimeter.
18+
- **`q` (Quarter-Millimeters)**: This absolute unit is equal to 1/40th of a centimeter.
19+
- **`pc` (Picas)**: This absolute unit is equal to 1/6th of an inch.
20+
- **`pt` (Points)**: This absolute unit is equal to 1/72th of an inch.
21+
22+
## Relative Units
23+
24+
- **Percentages**: These relative units allow you to define sizes, dimensions, and other properties as a proportion of their parent element. For example, if you set `width: 50%;` on an element, it will occupy half the width of its parent container.
25+
- **`em` Unit**: These units are relative to the font size of the element. If you are using `ems` for the `font-size` property, the size of the text will be relative to the font size of the parent element.
26+
- **`rem` Unit**: These units are relative to the font size of the root element, which is the `html` element.
27+
- **`vh` Unit**: `vh` stands for `"viewport height"` and `1vh` is equal to 1% of the viewport's height.
28+
- **`vw` Unit**: `vw` stands for `"viewport width"` and `1vw` is equal to 1% of the viewport's width.
29+
30+
## `calc` Function
31+
32+
- **`calc()` Function**: With the `calc()` function, you can perform calculations directly within your stylesheets to determine property values dynamically. This means that you can create flexible and responsive user interfaces by calculating dimensions based on the viewport size or other elements.
1333

1434
# --assignment--
1535

0 commit comments

Comments
 (0)