-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support for ElementInternals state #246
Comments
Can you elaborate/show some examples/documentation? |
/**
* @state open - When the element is open
*/
class MyEl extends HTMLElement {
constructor () {
super()
this.internals = this.attachInternals()
}
open () {
this.internals.states.add("open")
}
} Example of CSS Custom states: my-el { display: none; }
my-el:state(open) {
display: block;
} Also open to |
I think we should go with |
Works for me.
|
Why not @internalstate ? |
because its not consistent with |
Would it be possible to add a tag for
@state
to document CSS Custom States?The text was updated successfully, but these errors were encountered: