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

Include :open in the open variant #15349

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

lukewarlow
Copy link
Contributor

Update the open variant to addtionally match the new :open pseudo class.

See spec at https://drafts.csswg.org/selectors-4/#open-state

See Chromium intent to ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/Pdo4oOXYKcA

:open matches open <details> and <dialog> elements (already covered by [open]), but also matches select elements with their picker open and inputs with their picker open.

Thanks to :is() taking a forgiving selector list, this is safe to add even with limited browser support.

@lukewarlow lukewarlow requested a review from a team as a code owner December 9, 2024 23:37
@lukewarlow lukewarlow changed the title Update open variant Include :open in the open variant Dec 10, 2024
open now matches the new `:open` pseudo class.
@lukewarlow
Copy link
Contributor Author

@RobinMalfait now that v4 is out, is this addition something you'd be open to?

@RobinMalfait
Copy link
Member

Yep, I think this is a good idea, especially because :is(…) is forgiving. Thanks!

@RobinMalfait RobinMalfait enabled auto-merge (squash) January 27, 2025 12:42
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it, thanks!

@RobinMalfait RobinMalfait merged commit 6dd4c33 into tailwindlabs:next Jan 27, 2025
5 checks passed
@lukewarlow lukewarlow deleted the open branch January 27, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants