Advanced CSS & SASS (Udemy)
This section contains notes on this Udemy course.
Projects
Notes
!important- inline styles
idis more specific than 1,000 classesclassis more specific than 1,000 elements*is the least specific selector (0, 0, 0, 0)
Cascade rules: add up the numbers of each type of rule and read the rows from left to right. This table shows four examples from most specific to least specific.
| Inline | IDs | Classes | Elements |
|---|---|---|---|
| 0 | 1 | 2 | 2 |
| 0 | 1 | 2 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
References
For fonts, the reference for size is the parent element. For length, the reference for size is the current element.
The 7-1 Pattern
7 folders for scss files, and 1 main file to import them all.
base/components/layout/pages/themes/abstracts/vendors/
Tips
Always use % for image dimensions together with max-width.