Skip to content

[css-forms-1] Should select:not(:open)::picker(select) use display: none !important? #14061

@LeaVerou

Description

@LeaVerou

Currently there is a footgun where if authors need to remember to use :open if they want to set a different display value on a customizable select, otherwise the select is always open, just laid out badly (testcase)

Are there any use cases for having a display value other than none on pickers of closed selects? Now that we can animate from display: none, I can't think of any.

If not, I propose adding this to the UA stylesheet:

select:not(:open)::picker(select) {
	display: none !important;
}

This does not appear to negatively affect listbox selects, since they have no picker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions