-
Notifications
You must be signed in to change notification settings - Fork 378
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
Manage pseudo class matching state for custom elements #813
Comments
While working with custom states via There seems to be a rule in place for |
I've been building form elements recently and could really use the ability to act like a checkbox and use standard validation-related pseudo-classes. What's needed to manage these with CustomStateSet? Do we need a separate set because this state isn't custom? Or can we just use the colon-prefixed names, like |
I don't think we want this to be a feature on |
Providing a way to make a custom element matchable to the following pseudo classes would be helpful.
:checked, :indeterminate, :in-range, :out-of-range, :required, :optional, :read-only, :read-write
Usecase:
A web author makes a checkbox-like custom element, and want to support
:checked
pseudo class like the built-in<input type=checkbox>
.We discuss a similar feature at #738. Its selector syntax is something like
:state(checked)
, and it's not compatible with built-in elements.Proposal and feedbacks:
The initial idea was #738 (comment) .
There is a concern about difficulty of correct usage; #738 (comment)
The text was updated successfully, but these errors were encountered: