4 ms·
> and lets hope Firefox catches up soon. They won't implement it until the spec is finalized (is my guess, given that they haven't done so, so far). By encoura
by RheingoldRiver 3y ago
> and lets hope Firefox catches up soon.
They won't implement it until the spec is finalized (is my guess, given that they haven't done so, so far). By encouraging users to use :has already, you're encouraging Chrome's monopoly on the open internet, in direct contradiction to the W3c standard.
caniuse is an important tool, yes, but it's also super important to take into consideration what the literal standard says, which is that :has is not part of the specification. And Chrome directly working in contradiction to that is enormously bad for Internet users. Safari's decision to also implement :has early shouldn't make you bow down to Google in this case imo.
- magicalist 3y agoThe standards commentary is disingenuous (albeit I assume unintentionally). :is() is also part of the same CSS Selectors Level 4 draft spec and has been shipping in Firefox since version 78 (from June 2020). There were some open spec questions for :has() a while ago, but those have been resolved for some time. Exact ship date at this point is more a question of relative prioritization by the different browsers. As can be seen in https://bugzilla.mozilla.org/show_bug.cgi?id=418039 https://bugzilla.mozilla.org/show_bug.cgi?id=418039, the remaining work is around correctness and performance.
- alwillis 3y ago> They won't implement it until the spec is finalized (is my guess, given that they haven't done so, so far). Last time I checked their bug tracker, it had nothing to do with the specification—they had some technical implementation problems. My take on the situation: if they didn't get derailed by from what I recall were performance problems, they would have shipped it by now. > but it's also super important to take into consideration what the literal standard says, which is that :has is not part of the specification I'm not sure we're talking about the same thing; :has() is part of the "Selectors Level 4" specification [1] for a while now. I've read many W3C specifications; there's none of the usual warnings and caveats that are par for the course with experimental or unsupported specifications. That's not to say there won't be changes in the future, but that's true for virtually any recent CSS specification. As someone who follows this stuff pretty closely (I even read CSS working group meeting notes sometimes), this is the first time I've heard any objection to :has() at all and certainly nothing regarding the spec not being "done". I don't agree that Safari implemented :has() early; it's been in discussion for nearly 20 years and is something web developers have really wanted for just as long. The WebKit blog has a pretty good description of the back story why it took so long and what the breakthrough was [2]. [1]: https://drafts.csswg.org/selectors-4/#relational https://drafts.csswg.org/selectors-4/#relational [2]: https://www.webkit.org/blog/13096/css-has-pseudo-class/ https://www.webkit.org/blog/13096/css-has-pseudo-class/