descriptor

@counter style/negative — CSS reference

Defines a prefix and optional suffix surrounding negative representations for systems that support negative values. Numeric representation uses the absolute magnitude before applying the negative decorations. Marker-level prefix and suffix are separate.

Formal Syntax & Structure

css syntaxcss
@counter-style demo { negative: "(" ")"; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>@counter-style/negative</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}@counter-style demo{system:numeric;symbols:"0" "1" "2" "3" "4" "5" "6" "7" "8" "9";negative:"(" ")";suffix:": "}#a{list-style:demo inside}</style><body><ol id="a" start="-2"><li>ONE</li><li>TWO</li><li>THREE</li></ol></body></html>
CSS Reference