-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f65edc0
Add custom state pseudo-classes
josepharhar 9ca9840
Merge branch 'main' into customstate
josepharhar c5cbcb2
rename from :--foo to :state(foo)
josepharhar 6d86fd8
keith's suggestion
josepharhar a31bd6a
add html reference
josepharhar e243e60
Say that argument is case sensitive
josepharhar f2c7b40
rename custom-pseudo to custom-state
josepharhar d18d72f
move to overview.bs
josepharhar 6d75e4f
fix html spec link
josepharhar d351d4a
revert move to overview.bs and fix html spec link
josepharhar a6150c8
re-do fix html spec link
josepharhar 1d07766
Merge branch 'main' into customstate
josepharhar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing WPTs & impls make this case sensitive so:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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
<custom-ident>
implies; I think we have at least some amount of consensus that such exclusion was a bad idea in the first place and places that needed it should be using<dashed-ident>
instead, and that<custom-ident>
was a mistake. But on the other hand we should clearly document the case-sensitivity. I'm not sure what the current best practice is.(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 comment
The reason will be displayed to describe this comment to others. Learn more.
so should we do
<dashed-ident>
for now...? or keep it as<ident>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<dashed-ident>
is definitely wrong as this can take any ident. I suppose<ident>
is right from a strictly grammar standpoint because, as @dbaron points out, it doesn’t exclude css wide keywords.<ident>
claims case insensitivity though. Perhaps we could make a new token type here like<cased-ident>
. Otherwise we should keep it as<ident>
and either explain (or remove) the implementation handles cases discretely.There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The 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
<ident> | <dashed-ident>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No,
<dashed-ident>
is a subset of<ident>
, so just<ident>
is sufficient.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so since i'm currently using
<ident>
can we merge this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The 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