Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-lists/counter-reset-reversed-pseudo-003.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>CSS Lists: counter-reset: reversed() on element, counter-increment on its pseudo-element</title>
<link rel="help" href="https://drafts.csswg.org/css-lists/#counter-reset">
<link rel="help" href="https://drafts.csswg.org/css-lists/#instantiating-counters">
<link rel="author" title="Minseong Kim" href="mailto:jja08111@gmail.com">
<link rel="match" href="counter-reset-reversed-pseudo-003-ref.html">
<style>
.item {
counter-reset: reversed(foo);
counter-increment: foo -1;
}
.item::before {
counter-increment: foo -2;
content: "B" counter(foo);
}
.item::after {
counter-increment: foo -3;
content: "A" counter(foo);
}
</style>
<div class="item"></div>