counters js
This commit is contained in:
parent
5b80e66e60
commit
4a95558237
5 changed files with 154 additions and 85 deletions
|
|
@ -1,58 +1,70 @@
|
|||
#section__content{
|
||||
|
||||
counter-reset: h1;
|
||||
|
||||
h1{
|
||||
counter-increment: h1 1;
|
||||
counter-reset: h2;
|
||||
h1, h2, h3 {
|
||||
&::before{
|
||||
content: attr(data-counter);
|
||||
}
|
||||
}
|
||||
|
||||
h1::before{
|
||||
content: counter(h1, upper-alpha);
|
||||
|
||||
h4, h5, h6{
|
||||
&::before{
|
||||
content: attr(data-counter) ". ";
|
||||
}
|
||||
}
|
||||
|
||||
h2{
|
||||
counter-increment: h2 1;
|
||||
counter-reset: h3;
|
||||
}
|
||||
// counter-reset: h1;
|
||||
|
||||
h2::before{
|
||||
content: counter(h2, upper-roman);
|
||||
}
|
||||
// h1{
|
||||
// counter-increment: h1 1;
|
||||
// counter-reset: h2;
|
||||
// }
|
||||
|
||||
h3{
|
||||
counter-increment: h3 1;
|
||||
counter-reset: h4;
|
||||
}
|
||||
// h1::before{
|
||||
// content: counter(h1, upper-alpha);
|
||||
|
||||
h3::before{
|
||||
content: counter(h3);
|
||||
}
|
||||
// }
|
||||
|
||||
h4{
|
||||
counter-increment: h4 1;
|
||||
counter-reset: h5;
|
||||
}
|
||||
// h2{
|
||||
// counter-increment: h2 1;
|
||||
// counter-reset: h3;
|
||||
// }
|
||||
|
||||
h4::before{
|
||||
content: counter(h4, lower-alpha) ". ";
|
||||
}
|
||||
// h2::before{
|
||||
// content: counter(h2, upper-roman);
|
||||
// }
|
||||
|
||||
h5{
|
||||
counter-increment: h5 1;
|
||||
counter-reset: h6;
|
||||
}
|
||||
// h3{
|
||||
// counter-increment: h3 1;
|
||||
// counter-reset: h4;
|
||||
// }
|
||||
|
||||
h5::before{
|
||||
content: counter(h5, lower-alpha) counter(h5, lower-alpha) ". ";
|
||||
}
|
||||
// h3::before{
|
||||
// content: counter(h3);
|
||||
// }
|
||||
|
||||
h6{
|
||||
counter-increment: h6 1;
|
||||
}
|
||||
// h4{
|
||||
// counter-increment: h4 1;
|
||||
// counter-reset: h5;
|
||||
// }
|
||||
|
||||
h6::before{
|
||||
content: "(" counter(h6) "). ";
|
||||
}
|
||||
// h4::before{
|
||||
// content: counter(h4, lower-alpha) ". ";
|
||||
// }
|
||||
|
||||
// h5{
|
||||
// counter-increment: h5 1;
|
||||
// counter-reset: h6;
|
||||
// }
|
||||
|
||||
// h5::before{
|
||||
// content: counter(h5, lower-alpha) counter(h5, lower-alpha) ". ";
|
||||
// }
|
||||
|
||||
// h6{
|
||||
// counter-increment: h6 1;
|
||||
// }
|
||||
|
||||
// h6::before{
|
||||
// content: "(" counter(h6) "). ";
|
||||
// }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue