Skip to content

Instantly share code, notes, and snippets.

@dippas
Created June 28, 2023 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dippas/ffbe62979d7ae2e02916acf808396615 to your computer and use it in GitHub Desktop.
Save dippas/ffbe62979d7ae2e02916acf808396615 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
div.toc-wrapper {
counter-reset: my-counter 0;
$maxCount: 25;
@for $counterValue from 1 through $maxCount {
$formattedValue: if($counterValue < 10, '0' + $counterValue, $counterValue);
li.toc-item-h2 {
&:nth-child(#{$counterValue})::before {
counter-increment: my-counter;
content: '#{$formattedValue}:';
padding-right: 8px;
}
}
}
}
div.toc-wrapper {
counter-reset: my-counter 0;
}
div.toc-wrapper li.toc-item-h2:nth-child(1)::before {
counter-increment: my-counter;
content: "01:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(2)::before {
counter-increment: my-counter;
content: "02:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(3)::before {
counter-increment: my-counter;
content: "03:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(4)::before {
counter-increment: my-counter;
content: "04:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(5)::before {
counter-increment: my-counter;
content: "05:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(6)::before {
counter-increment: my-counter;
content: "06:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(7)::before {
counter-increment: my-counter;
content: "07:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(8)::before {
counter-increment: my-counter;
content: "08:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(9)::before {
counter-increment: my-counter;
content: "09:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(10)::before {
counter-increment: my-counter;
content: "10:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(11)::before {
counter-increment: my-counter;
content: "11:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(12)::before {
counter-increment: my-counter;
content: "12:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(13)::before {
counter-increment: my-counter;
content: "13:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(14)::before {
counter-increment: my-counter;
content: "14:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(15)::before {
counter-increment: my-counter;
content: "15:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(16)::before {
counter-increment: my-counter;
content: "16:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(17)::before {
counter-increment: my-counter;
content: "17:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(18)::before {
counter-increment: my-counter;
content: "18:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(19)::before {
counter-increment: my-counter;
content: "19:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(20)::before {
counter-increment: my-counter;
content: "20:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(21)::before {
counter-increment: my-counter;
content: "21:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(22)::before {
counter-increment: my-counter;
content: "22:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(23)::before {
counter-increment: my-counter;
content: "23:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(24)::before {
counter-increment: my-counter;
content: "24:";
padding-right: 8px;
}
div.toc-wrapper li.toc-item-h2:nth-child(25)::before {
counter-increment: my-counter;
content: "25:";
padding-right: 8px;
}
{
"sass": {
"compiler": "dart-sass/1.32.12",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment