Skip to content

[css-lists-4][css-content-3] Add counter-style property to associate default counter style #8997

@fantasai

Description

@fantasai

Currently counters are associated with a name, but they're not associated with a counter style. You have to provide that style manually every time you use the counters() function. This is kindof okay for most uses of counters, but it's a bit of a problem for target-counter() because then you have to track which counters use which styles, and it gets extra complicated if you want to do multi-level lists (which all have the same counter name).

I think it would be good to introduce a counter-style property that tracks with counter-reset, and associates the named counter with its default style. Authors can still override it, but then at least it can default to the same representation everywhere it occurs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions