Re: [csswg-drafts] [css-conditional-4] Rename @when to @if (#6684)

I haven't read through this entire thread, but as the lead designer of Sass I can provide some context on how the name `@if` would affect Sass users. See also [my discussion of the broader principle](https://github.com/w3ctag/design-principles/issues/335#issuecomment-922067280) in the w3ctag thread.

**In short, it would be catastrophic**. The `@if` construct is one of the oldest and most widely-used in Sass, and is particularly indispensable for stylesheet libraries which are extremely widely-used. It's likely that the majority of Sass files uses `@if` either directly or transitively. Changing its syntax would be an order of magnitude more disruptive than any other breaking change we've done, it would take years to fully land, and it would make Sass users *furious*.

I know this because we've done other, smaller breaking changes to ensure we're compatible with CSS (most recently reserving the `/` character for use as a separator as it is in CSS). Even with years of lead time, automated migration tooling, and easy and intuitive alternatives those changes have led to people flooding our feedback channels with outrage about deprecation messages and broken libraries. Deprecating `@if` would be much much worse than that.

Workarounds like allowing `@If` are cute, but they don't address the core issue: Sass is a CSS superset, and our core promise to users is that we support all valid CSS as-is. Even if users knew to write capital `@If` in Sass (which they wouldn't), it would break the core invariant that you can just copy/paste CSS into a Sass file and have it work.

To summarize: I am *begging* you, on behalf of all Sass users, not to use `@if`. Sass users are CSS users, and harming them harms CSS users. What's more, Sass users are among the most dedicated and invested CSS users: Sass is [the most widely-used tool](https://2021.stateofcss.com/en-US/technologies/scatterplot_overview) among professional designers and one of the most popular as well. Sass users are a core segment of the people who speak at design conferences, talk up new CSS features, and form the fabric of the community. Don't alienate them over word choice when a perfectly good `@when` is right there.

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


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

Received on Tuesday, 15 March 2022 21:07:36 UTC