Skip to content

[css-lists-3] [css-values-5] Potential issue with toggle() and ul in css-lists-3 Appendix A #13753

@sleepy-monax

Description

@sleepy-monax

Hi,

While implementing the toggle() function in my web engine, I believe I found an error in Appendix A: Sample Style Sheet for HTML of the css-lists-3 specification.

The sample stylesheet suggests defining unordered lists as follows:

ul { list-style-type: toggle(disc, circle, square); }

However, the initial value of list-style-type is disc.

According to css-values-5 regarding how toggle() is evaluated:

"Then, compare the property’s inherited value with each Cn. For the earliest Cn that matches the inherited value, the computed value of toggle() is Cn+1."

The Issue:
Because the default inherited value is already disc, the toggle() function will match disc (C1) and immediately compute to the next value in the list, which is circle (C2).

This results in a top-level <ul> incorrectly computing to circle instead of the expected disc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions