Single-colon pseudoselectors
This commit is contained in:
parent
1275aaded1
commit
3b12a290a3
|
@ -22,7 +22,7 @@ pre { padding: 0.33rem; }
|
||||||
body {
|
body {
|
||||||
counter-reset: section 0 subsection 0;
|
counter-reset: section 0 subsection 0;
|
||||||
}
|
}
|
||||||
h2::before, h3::before {
|
h2:before, h3:before {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -33,14 +33,14 @@ h2::before, h3::before {
|
||||||
margin-right: -2em;
|
margin-right: -2em;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
h2::before {
|
h2:before {
|
||||||
counter-increment: section;
|
counter-increment: section;
|
||||||
content: counter(section) ". ";
|
content: counter(section) ". ";
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
counter-reset: subsection 0;
|
counter-reset: subsection 0;
|
||||||
}
|
}
|
||||||
h3::before {
|
h3:before {
|
||||||
counter-increment: subsection;
|
counter-increment: subsection;
|
||||||
content: counter(section) "." counter(subsection) ". ";
|
content: counter(section) "." counter(subsection) ". ";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue