Skip to content

[selectors] Pseudo-class for details #611

@AndySky21

Description

@AndySky21

Pseudo-classes

Given the description for pseudo-classes and the fact that element interactivity is meant to be handled by UAs instead of relying upon scripts, it would be logical and consistent with other interactive elements if <details> open state were matched by an :open pseudo class.
On the other hand (and as stated by @chaals), this would would provide a CSS styling hook without the need for UAs to add/remove a content attribute according to user interaction. As a consequence, <details>.open IDL property will be allowed to reflect the element state instead of the content attribute.

Related issue: w3c/html#600

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