Re: [csswg-drafts] [mediaqueries][css-conditional] else (#112)

I'd like to express my **strong** agreement with @upsuper, @Marat-Tanalin and @bradkemper above in favor of `@if` over `@when`.

1. [Consistency](https://w3ctag.github.io/design-principles/#consistency) with every other language authors may have used
2. As has been repeatedly mentioned, we should not be designing CSS, a language that needs to last decades and for which the burden of changes is incredibly high, based on conflicts with a preprocessor that _happens_ to be in use today (and is already giving way to others, e.g. PostCSS). Preprocessors can adapt far more easily than CSS, and any third-party project ultimately has far fewer users than CSS. Many solutions for Sass have been suggested in this very thread. Also, CSS authors are far, far more than Sass authors, and thus we should be designing CSS in the way that's best for CSS authors, not Sass authors (when these are in conflict).
3. Preprocessors are not executed on every page load, so it's far easier for Sass authors to migrate to a new syntax at their own time. This is not like the issue TC39 faced with `array.contains()` at all.

Note: `@if` *is* used quite heavily: [about 63% of Sass stylesheets use it](https://almanac.httparchive.org/en/2020/css#fig-72). But even if it was used in 100% of them we should not design CSS around Sass.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/112#issuecomment-919879061 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 September 2021 10:02:20 UTC