- Basics
- The Cascade
- Specificity
- Box Model
- Layout
- Naming Conventions
/* 👇 This is the selector */
.red {
color: red;
}
.red {
color: red;
/* 👆 this is the property. */
}
.red {
color: red;
/* 👆 this is the value. */
}
CSS stands for Cascading Style Sheets.
The "Cascade" in CSS applies rules from top to bottom.
Specificity determines, which rule is applied by the browsers.
Specificity is usually the reason why your CSS-rules don’t apply to some elements, although you think they should.
If two selectors apply to the same element, the one with higher specificity wins.
Notebook is the content.
Bubblewrap is the padding.
Bag is the border.
Space between bag to other bag is margin.