Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[selectors-4] Should we have :open and :closed? #11039

Open
josepharhar opened this issue Oct 15, 2024 · 3 comments
Open

[selectors-4] Should we have :open and :closed? #11039

josepharhar opened this issue Oct 15, 2024 · 3 comments
Labels

Comments

@josepharhar
Copy link
Contributor

It was resolved here to have both :open and :closed pseudo-classes: #7319 (comment)

@annevk mentioned here that :closed is redundant with :not(:open): WebKit/standards-positions#413 (comment)

Here is the justification for having both of them: #7319 (comment)

Should we also talk about adding the corresponding :closed pseudo class? That would avoid the problem that :not(:open) can match anything, including things that don't open or close.

The HTML spec has not been merged yet: whatwg/html#10126

@annevk
Copy link
Member

annevk commented Oct 15, 2024

Note in particular that the justification for :closed is no longer valid with the current HTML PR. We did not want to make :closed only match things that can be closed as this set of items might change over time.

@tabatkins
Copy link
Member

Okay, if you purposely don't want to hook :closed to the "openability" of an element, then yeah, it's completely redundant with :not(:open) and we probably shouldn't add it.

@josepharhar
Copy link
Contributor Author

I am in favor of removing :closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants