ladybird/Tests/LibWeb/Layout/input/css-counters/counters-function.html
Sam Atkins 898e3bd898 Last: LibWeb: Add counter() and counters() functions to content property
These let you format counters' current values as strings for use in
generated content.
2024-07-26 11:04:30 +01:00

36 lines
822 B
HTML

<style>
div.ol {
counter-reset: index;
padding-left: 1em;
}
div.li {
counter-increment: index;
}
div.li::before {
content: counters(index, ".") ": ";
}
</style>
<div class="ol">
<div class="li">A</div>
<div class="li">B</div>
<div class="li">C</div>
<div class="li">
<div class="ol">
<div class="li">D</div>
<div class="li">E</div>
<div class="li">
<div class="ol">
<div class="li">F</div>
<div class="li">G</div>
<div class="li">H</div>
</div>
</div>
<div class="li">I</div>
<div class="li">J</div>
</div>
</div>
<div class="li">K</div>
<div class="li">L</div>
<div class="li">M</div>
</div>