JSFiddle - React, Tailwind, and code Playground
by alexb
HTML
<ol>
<li>
Parent
<ol>
<li>Child</li>
<li>Child</li>
<li>Child</li>
</ol>
</li>
<li>
Parent B
<ol>
<li>Child</li>
<li>Child</li>
<li>Child</li>
</ol>
</li>
</ol>
SCSS
ol {
list-style: none;
counter-reset: custom;
li {
counter-increment: custom;
&::before {
content: counter(custom) " - ";
}
}
}