-
Notifications
You must be signed in to change notification settings - Fork 715
[selectors-5] Add custom state pseudo-classes #8213
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
Changes from 5 commits
f65edc0
9ca9840
c5cbcb2
6d86fd8
a31bd6a
e243e60
f2c7b40
d18d72f
6d75e4f
d351d4a
a6150c8
1d07766
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -127,3 +127,14 @@ The local link pseudo-class '':local-link''</h3> | |||||
What about if the document url has less than N segments, | ||||||
and the link is same-page? | ||||||
Should "null segments" count as matching, or not? | ||||||
|
||||||
<h3 id="custom-pseudo">Exposing custom state: the '':state()'' pseudo-class</h3> | ||||||
|
||||||
The <dfn selector>:state()</dfn> pseudo-class takes an argument and matches | ||||||
custom elements whose exposed custom states include the argument. | ||||||
|
||||||
The grammar of the '':state()'' pseudo-class is: | ||||||
|
||||||
<pre class=prod>:state( <ident> )</pre> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Existing WPTs & impls make this case sensitive so:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect we don't want the exclusion of CSS-wide keywords that (I can't find any reference for this longer than #7431 (comment) but there might be a more detailed explanation somewhere.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so should we do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what is best here. @tabatkins can you advise? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can’t find the reference to case insensitivity now. The string given to customstateset can be dashed so should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok so since i'm currently using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should add a sentence saying it's case-sensitive. (unless @tabatkins disagrees, at least.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I amended the first sentence to say that the argument is case sensitive |
||||||
|
||||||
The exact matching behavior of '':state()'' pseudo-class is defined by the host language. See <a spec=html lt="custom" selector>HTML's definition</a>. |
Uh oh!
There was an error while loading. Please reload this page.