function

Reversed() — CSS reference

Creates a reversed counter with a computed initial value when no integer is given. A decrement on each counted element produces descending numbering. This Chromium rejects reversed(); the example uses an explicit starting value as a fallback for a known three-item set.

Formal Syntax & Structure

css syntaxcss
counter-reset: reversed(n);

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>reversed()</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/1.5 sans-serif}#a{margin:16px;padding:8px 8px 8px 80px;background:white}li{padding-left:4px}#a{counter-reset:n 4;counter-reset:reversed(n);list-style:none}li{counter-increment:n -1}li::before{content:counter(n) ": "}</style><body><ol id="a"><li>ONE</li><li>TWO</li><li>THREE</li></ol></body></html>
CSS Reference