Last: LibWeb: Add counter() and counters() functions to content property

These let you format counters' current values as strings for use in
generated content.
This commit is contained in:
Sam Atkins
2024-07-18 20:29:02 +01:00
parent 576a431408
commit 898e3bd898
Notes: github-actions[bot] 2024-07-26 10:05:28 +00:00
8 changed files with 553 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
<style>
div {
counter-increment: line;
counter-reset: word;
}
p {
counter-increment: word;
}
p::before {
content: counter(line) "." counter(word) ": ";
}
</style><div><p>Never<p>Gonna<p>Give<p>You<p>Up</div><div><p>Never<p>Gonna<p>Let<p>You<p>Down</div>