-
Notifications
You must be signed in to change notification settings - Fork 661
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
[selectors] webkit-prefixed pseudo-elements are always treated valid in WebKit and Blink #2156
Comments
(If we want to spec this behavior, I guess this can happen in either the compat spec, or the selectors spec, but I want to hear from CSSWG for thoughts either way.) |
Please file a bug to Chromium project and other webkit browsers developers. Invalid a part of selector = invalid whole selector. The -moz- and -ms- selectors are used to detect functionality and version of browser, In this case for fieldset correction in part of firefox/Chrome browsers we can write:
The prefixed pseudoelements doesn't have to be used on appropriate elements for filtering functionality and detecting affected versions of browsers. The parsing proces is OK, then the styles will be applied. Please read about hacks for EDGE, IE10+ and Firefox. Here living example - the div is not styled. It is a hack. Also hack to filter the MSIE and EDGE. |
Yeah, it would definitely be a concern as well that other non-WebKit-based browsers may start getting WebKit-specific hacks if they accept webkit-prefixed pseudo-elements unconditionally, but it would also be a concern for WebKit and Blink-based browsers to drop that because that breaks some websites too. FWIW, it was raised based on Firefox bug 1424106 which was filed for webcompat/web-bugs#14117. |
If any browser start to "support" (often bugly) foreign -prefixes- - the developers work it without thinking and without knowledge why it is written and... for their risk. Many people can drop their browser if many of webpages will be shown badly. Actually Moz (Thunderbird+Firefox+Gecko based browsers) supports only -moz- extended selectors. The -ms- selectors are supported only by MSIE and EDGE, The -webkit- is supported partially by.. EDGE. EDGE probably due to fact the M$ is ashamed of its own products and EDGE pretends to be a webkit browser even in UserAgent String. In reality the EDGE (12.0) is next version of IE (11.0). There should not be any exception for -webkit- selectors. |
BTW. If Chromium / Safari starts support to The
looks like code from CSS minimizer/precompiler. Probably the minimizer has a bug. CSS Minimizers should not change prefixed selectors. |
@Nadya678 Claiming that broken pages are solely the fault of the page owner is not helpful. Ordinary browser users don't like it when pages look broken; they usually blame the browser for that, especially when it looks fine in other browsers, and so there's often incentives to continue to support hacks if they're sufficiently widespread. That said, I have no idea what sort of impact this would have in practice. I'm fine with trying to have it removed; if not, I'm fine with it going into the Compat spec. |
From Chrome's stats data, webkit unknown pseudo counts ~0.003% of page loads. Maybe it is something low enough for you to consider removing? |
The Working Group just discussed The full IRC log of that discussion<dael> Topic: [selectors] webkit-prefixed pseudo-elements are always treated valid in WebKit and Blink<dael> github: https://github.com//issues/2156 <nainar> I've changed the wiki page to reflect this: https://wiki.csswg.org/planning/sydney-2018 <dael> ??: We don't have any useful statistics yet for webkit. I don't think we have enough information to know how often it happens. <nainar> s/???/ericwilligers <dael> florian: Presumably while gathering stats if we can tell the difference between webkit prefix that exists vs nonsense with a webkit prefix. So we can see if we need a short whitelist or a wildcard. <dael> ericwilligers: I did distinguish but I don't have the data. <ericwilligers> Chrome bug is crbug.com/547869 The use counter was added in December. We need to wait for this to reach stable before we have useful stats. <dael> xidorn: It seems to be Chrome has some data for the unknown pseudo elements. <dael> xidorn: I think it's 0.003% of pages. <dael> ericwilligers: That's only people running like canary <dael> Rossen_: Are you saying current data is only on canary which isn't very rep? <dael> ericwilligers: Yes. <dael> Rossen_: So fair to say we need to wait a little longer for actual data? <dael> ericwilligers: Yes, before we can make a blink change. <dael> Rossen_: Obj to moving on as the Chrome folks are collecting data? |
what is usage (stats) of it with -ms- and -moz- that are no effect today and will have effect after changes? It is correct reaction of users if they blame the only-one browser. The hacks are used ONLY if browser has a bug in rendering engine. there in Chromium bugtracker there can be added info to contact webmaster of website first. The 0.003% is a low figure. It is high time to clarify it before this figure goes up. BTW. Owners of webpages will report the problem to their webmasters. |
@Nadya678, there was even a petition to browser vendors not to implement |
@Nadya678 please keep the discussion to the technical issue at hand. Most of your previous comment isn't adding anything useful. |
Is it possible to make informative campaign - If user opens a webpage with -webkit- selectors, then Mozilla, EDGE and other web-browsers will show information "The webpage uses unknown experimental features of other browser, please contact webmaster of [domain]. Check the 'contact section' to get an e-mail"? the same feature for ::-moz- and ::-ms- if browser doesn't support. This due to big amount of e-mails shall "help" the webmaster to improve affected webpages. Regarding -webkit- styles information show only if standard (not-prefixed) style is not included. |
The data is now showing ~40% of page loads have unknown |
Woah, wtf. Well, that answers that then. It's almost certainly impossible for us to remove that behavior. We should document it in Compat, then. |
I believe this issue can be closed. Similar issues #3051 and whatwg/compat#103 are already closed. |
There is a webcompat issue raised against Firefox that Firefox treats rules like the following invalid which breaks some websites:
This is a reasonable behavior since Firefox doesn't support those webkit-prefixed pseudo-elements, and thus, according to the spec, it should treat the whole selector list invalid.
However, at least Blink only supports
-webkit-search-cancel-button
, and doesn't support any other pseudo-element here either, but it doesn't treat the rule invalid.Then I did some test and I realized that in Blink and WebKit, all pseudo-element prefixed with
-webkit-
is treated valid, as can be shown with the following testcase:I'm not sure what should we do, then.
Should we spec this behavior that any webkit-prefixed pseudo-element should be accepted even if it's unknown? Or should we push WebKit and Blink to change their behavior here?
The text was updated successfully, but these errors were encountered: