descriptor
@counter style/pad — CSS reference
Sets the minimum representation length in symbols and the symbol used for padding. For decimal-like systems, leading zeros are a common use. Negative signs are considered by the padding algorithm; marker prefix and suffix do not count.
Formal Syntax & Structure
css syntaxcss
@counter-style demo { pad: 3 "0"; }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>@counter-style/pad</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:extends decimal;pad:3 "0";suffix:": "}#a{list-style:demo inside}</style><body><ol id="a"><li>ONE</li><li>TWO</li><li>THREE</li></ol></body></html>