Skip to content

[css-lists] Should option/optgroup be able to set counters? #4004

@tabatkins

Description

@tabatkins

Should one be able to use 'counter-increment'/etc on <option>/<optgroup> (and other replaced-element form-control descendants)?

I think a strict reading of the spec says no - since <select> is replaced, its children don't generate CSS boxes, and things that don't generate CSS boxes can't interact with counters.

However, that text was written with display:none in mind, not necessarily replaced element descendants.

Here's an example: https://codepen.io/kizu/pen/PEJgpr. Apparently this works in Firefox, and pre-chromium Edge, but it does not work in WebKit or Chrome.

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