mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
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:
Notes:
github-actions[bot]
2024-07-26 10:05:28 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/898e3bd8987 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/720 Reviewed-by: https://github.com/tcl3
12
Tests/LibWeb/Layout/input/css-counters/basic.html
Normal file
12
Tests/LibWeb/Layout/input/css-counters/basic.html
Normal 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>
|
||||
Reference in New Issue
Block a user