Single-colon pseudoselectors

This commit is contained in:
Tony Garnock-Jones 2018-09-24 18:11:34 +01:00
parent 1275aaded1
commit 3b12a290a3
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ pre { padding: 0.33rem; }
body {
counter-reset: section 0 subsection 0;
}
h2::before, h3::before {
h2:before, h3:before {
text-align: right;
display: inline-block;
position: relative;
@ -33,14 +33,14 @@ h2::before, h3::before {
margin-right: -2em;
height: 0;
}
h2::before {
h2:before {
counter-increment: section;
content: counter(section) ". ";
}
h2 {
counter-reset: subsection 0;
}
h3::before {
h3:before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) ". ";
}