mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
804 B
804 B
| title | aliases | tags | |
|---|---|---|---|
| css |
|
Structure
h1(selector) {
color(property): red(value/function); \
font-size: 5em; / - declarations
}
Selectors
Types
- Universal:
* - Type:
main - Class:
.myclass - Id:
#myID
adjacent: p + li {...}
descendant: p li {...}
/* selects any <span> that is inside a <p>, which is inside an
<article> */
article p span { }
/* selects any <p> that comes directly after a <ul>, which
comes directly after an <h1> */
h1 + ul + p { }
Pseudo Classes:
a:link {...}a:visited {...}a:hover {...}- etc
Pseudo Elements
p::first-line {...}
Specificity
Rules at a higher level of specificity will override a rule at a lower level
Types
- Universal: 1
- Type: 10
- Class: 100
- Id: 1000