You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the blog post on native CSS nesting, Sass would consider emitting nesting rules using :is() when browser support for this feature is at least 98%. It links to the caniuse page as a reference for this statement, which is currently listing 95.91% of global marketshare with full support for :is().
However, as per the discussion here, any percentage reported by caniuse is capped at 97.98% due to the way it considers untracked browsers to (pessimistically) always have 0% support. This means that :is() will never reach 98% as per the default metric. If we change to "all tracked" instead, then caniuse reports 98+% support for :is().
So then, should we consider :is() to be at the required level of support now?
The text was updated successfully, but these errors were encountered:
This is a tricky question. We really do want to be very conservative about when we unavoidably emit code that's known to be incompatible with older browsers: in almost all cases, Sass will only emit new CSS features if the author explicitly writes them, so our browser compatibility window is very long by default, and we don't want to break users who are relying on that (e.g. to support internal tools, to support markets with high retention of older devices, etc). On the other hand, there's no point in having a bar that's literally impossible to reach.
I think the most robust solution here would be to say that in order to demonstrate that it's sufficiently safe to use a given feature, someone needs to actually do the legwork and test that feature against enough of the remaining browsers not covered by caniuse to show that it does in practice have 98%+ penetration. Unfortunately, the caniuse data doesn't make it very clear what those browsers are or what the relative usage percentages of each version is, so this is substantially difficult in its own right. But I do think it's worth investigating.
It's also worth noting that although the "all tracked" support for :is() is 98.09%, the "tracked desktop" support is only 96.47%, which possibly should be enough to disqualify it on its own.
From a broader perspective: :is() isn't even 5 years old yet in its current form. We only started emitting hsl() in 2022, twenty years after it first appeared in a working draft for CSS Color 3 and 14 years after full support first landed in Firefox. This situation is definitely a little different, in that moving to :is() aligns us with CSS compatibility in other ways, but I'm still in no hurry to start supporting it.
As per the blog post on native CSS nesting, Sass would consider emitting nesting rules using
:is()
when browser support for this feature is at least 98%. It links to the caniuse page as a reference for this statement, which is currently listing 95.91% of global marketshare with full support for:is()
.However, as per the discussion here, any percentage reported by caniuse is capped at 97.98% due to the way it considers untracked browsers to (pessimistically) always have 0% support. This means that
:is()
will never reach 98% as per the default metric. If we change to "all tracked" instead, then caniuse reports 98+% support for:is()
.So then, should we consider
:is()
to be at the required level of support now?The text was updated successfully, but these errors were encountered: