-
Notifications
You must be signed in to change notification settings - Fork 719
[selectors] Specify the "all ::-webkit-* pseudos are valid" behavior #3051
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
Comments
@fantasai and I have gone ahead and added the section to Selectors 4 for discussion. |
It is regrettable that we need this, but Firefox implementing it shows that we do. So yes, this should be in the spec, thanks for writing it. |
The added text is wrong. Only those pseudo-elements need to be valid, pseudo-classes don't. WebKit and Blink doesn't allow arbitrary webkit-prefixed pseudo-class either. |
Ah, that wasn't clear from the whatwg/compat issue. I'll fix. |
Fixed in 456e902 |
Looks good now, thanks. |
Is it hard to limit the list to the currently exposed ::-webkit- pseudo-elements? |
That's the point of the compat bug - WK-derived browsers accept all pseudo-elements with a -webkit- prefix as valid at parse time, not just ones that they actually know about. If we can change Blink/WebKit to stop recognizing those as valid, great. But I doubt that's possible, if the quirk has gotten bad enough that Firefox feels the need to implement it. |
yeah that was my intent. but after reading #2156 (comment) now I understand it seems impossible (still doubt how and why ~40% of page loads has unknown ::-webkit-whatever though...) |
There are two reasons for Firefox to implement it:
So this is a matter of webcompat directly and indirectly. |
Sadly, folks use this hack to target those browsers in order to get around other compat issues, like differences in implementation of the |
Using hacks that assume support for X is equivalent to support for Y is a bad idea if those hacks are targeting current browsers. Such hacks are safe only if the features are implemented in all current browsers and the equivalence holds in the old versions where they're not implemented. |
To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051.
To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051.
The CSS Working Group just discussed
The full IRC log of that discussion |
Years ago, allowing "MQ-style invalidation" for selector lists was seen as unsafe, most likely breaking old sites when it would "activate unexpected declaration blocks". Though I trust @dbaron's opinion on the real issues
https://www.w3.org/Style/CSS/Tracker/issues/223 |
…orrect spec link, a=testonly Automatic update from web-platform-testsUpdate webkit-pseudo-element test with correct spec link. (#12683) To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051. -- wpt-commits: 04d0c8c0d8f8f9f0e91881be731fd344477573dc wpt-pr: 12683
…orrect spec link, a=testonly Automatic update from web-platform-testsUpdate webkit-pseudo-element test with correct spec link. (#12683) To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051. -- wpt-commits: 04d0c8c0d8f8f9f0e91881be731fd344477573dc wpt-pr: 12683
In #3082, we have a proposal to use the reverse strategy regarding pseudo-elements: treat all unknown pseudo-elements (not just Are there any pseudo-elements other than |
…orrect spec link, a=testonly Automatic update from web-platform-testsUpdate webkit-pseudo-element test with correct spec link. (#12683) To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051. -- wpt-commits: 04d0c8c0d8f8f9f0e91881be731fd344477573dc wpt-pr: 12683 UltraBlame original commit: 0f3786ce06a117be24250205d060ebd4a180a5bf
…orrect spec link, a=testonly Automatic update from web-platform-testsUpdate webkit-pseudo-element test with correct spec link. (#12683) To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051. -- wpt-commits: 04d0c8c0d8f8f9f0e91881be731fd344477573dc wpt-pr: 12683 UltraBlame original commit: 0f3786ce06a117be24250205d060ebd4a180a5bf
…orrect spec link, a=testonly Automatic update from web-platform-testsUpdate webkit-pseudo-element test with correct spec link. (#12683) To reflect that this was added into selectors spec rather than compat spec, and update the link correspondingly. Related to w3c/csswg-drafts#3051. -- wpt-commits: 04d0c8c0d8f8f9f0e91881be731fd344477573dc wpt-pr: 12683 UltraBlame original commit: 0f3786ce06a117be24250205d060ebd4a180a5bf
For a while, WebKit-derived browsers have had a quirk where all
::-webkit-*
pseudo-elements are considered valid at parse time (and thus won't invalidate a selector list if they appear in only one selector). This has apparently begun to create compat problems for Firefox (see whatwg/compat#103), so they're adding that behavior themselves. This behavior is being tracked in WPT tests in web-platform-tests/wpt#12673.We should go ahead and inline that into the Selectors spec, probably in a compatibility appendix.
The text was updated successfully, but these errors were encountered: