Allows custom counter styles (@counter-style rules) to be defined with shadow trees, and properly referenced within shadow trees or across shadow boundaries.


Currently, if we want to use a custom counter style in shadow trees, the counter style must be defined in the global namespace (i.e., in the light DOM), which breaks encapsulation. This can be fixed if we allow shadow trees to define their own custom counter styles and handle name scoping and conflicts correctly.



Specification link

Specification currently under development in a Working Group

Status in Chromium


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.


Intent to Prototype url

Intent to Prototype thread


This is part of the feature They were implemented together during prototyping. However, this feature was held back from shipping because the spec wasn't ready until a later CSSWG resolution

Search tags

css, counter, counter-style, shadow,

Last updated on 2021-12-20