mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 06:55:42 -05:00
vault backup: 2022-10-24 18:03:08
This commit is contained in:
parent
37388b6b19
commit
7b57811b74
@ -14,6 +14,8 @@ h1(selector) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Selectors
|
# Selectors
|
||||||
Types
|
Types
|
||||||
- Universal: `*`
|
- Universal: `*`
|
||||||
@ -21,8 +23,14 @@ Types
|
|||||||
- Class: `.myclass`
|
- Class: `.myclass`
|
||||||
- Id: `#myID`
|
- Id: `#myID`
|
||||||
|
|
||||||
adjacent: `p + li {...}`
|
Combining
|
||||||
descendant: `p li {...}`
|
- grouping: `p, li`
|
||||||
|
- adjacent: `p + li`
|
||||||
|
- descendant: `p li`
|
||||||
|
- direct descendant: `div > h1`
|
||||||
|
- general sibling: `div ~ h1`
|
||||||
|
- chaining: `.class1.class2`
|
||||||
|
- attribute: `div[lang]`
|
||||||
|
|
||||||
```css
|
```css
|
||||||
/* selects any <span> that is inside a <p>, which is inside an
|
/* selects any <span> that is inside a <p>, which is inside an
|
||||||
@ -43,14 +51,34 @@ Pseudo Classes:
|
|||||||
Pseudo Elements
|
Pseudo Elements
|
||||||
- `p::first-line {...}`
|
- `p::first-line {...}`
|
||||||
|
|
||||||
|
## Inheritance
|
||||||
|
Some properties like color are inherited by some children elements. width, margin, padding, border are not inherited
|
||||||
|
|
||||||
|
Controls
|
||||||
|
- inherit: sets property to the same as parent element
|
||||||
|
- inital: sets property value to inital/default value of that property
|
||||||
|
- unset: sets property to natural value (inherit or dont inherit)
|
||||||
|
|
||||||
|
## Cascade
|
||||||
|
Three rules - higher ones overrule lower ones
|
||||||
|
- Importance
|
||||||
|
- Specificity
|
||||||
|
- Source Order (only matters if specificity is the same)
|
||||||
|
|
||||||
## Specificity
|
## Specificity
|
||||||
Rules at a higher level of specificity will override a rule at a lower level
|
Rules at a higher level of specificity will override a rule at a lower level
|
||||||
|
|
||||||
|
ID > class > element.
|
||||||
|
|
||||||
Types
|
Types
|
||||||
- Universal: 1
|
- Universal: 1
|
||||||
- Type: 10
|
- Type: 10
|
||||||
- Class: 100
|
- Class: 100
|
||||||
- Id: 1000
|
- Id: 1000
|
||||||
|
|
||||||
# Tables
|
|
||||||
|
|
||||||
|
|
||||||
|
# Media Queries
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user