Skip to content

[css-lists][cssom] Should the serialization of counter-reset/increment include default values? #2635

Closed
@squelart

Description

@squelart

In the CSSOM general principles of serialization: https://drafts.csswg.org/cssom/#serializing-css-values

If component values can be omitted or replaced with a shorter representation without changing the meaning of the value, omit/replace them.

This would suggest that if a counter-reset or counter-increment was declared with no values, its serialization should not include the default value (resp. 0 or 1).

E.g.: <body style="counter-increment: abc" onload="alert(document.body.style.counterIncrement)"> should display "abc".
Edge 42 does this.
However Firefox 60, Chrome 66, and Safari 11.1 currently display "abc 1".

So, should the general rule be followed, or should there be a special case for counters? (Or something else?)

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