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

Should there be a :inert pseudo-class? #10824

Open
benface opened this issue Sep 3, 2024 · 3 comments
Open

Should there be a :inert pseudo-class? #10824

benface opened this issue Sep 3, 2024 · 3 comments
Labels
selectors-4 Current Work

Comments

@benface
Copy link

benface commented Sep 3, 2024

HTML has a new-ish inert attribute, but as far as I can tell, the only way to select inert elements in CSS is with :is([inert], [inert] *) (since children of inert elements are also inert), which I don't think is perfect as it ignores the DOM property. Would it make sense to introduce a :inert pseudo-class, similar to :disabled? There may not be a lot of use cases for it, but I was still surprised by the lack of discussion about it (it's possible I didn't search well enough, if so I apologize).

@nt1m
Copy link
Member

nt1m commented Sep 3, 2024

Given there's discussion into making inert CSS controllable, this might prevent it from becoming possible since it'll create circularity (cc @flackr)

@nt1m
Copy link
Member

nt1m commented Sep 3, 2024

(Note that dialogs/fullscreen also contribute to inertness, not just the inert attribute)

@Loirooriol
Copy link
Contributor

Some discussion in #8389 (comment)

@Loirooriol Loirooriol added the selectors-4 Current Work label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selectors-4 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants