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

I do not lean heavily in either direction, however I do think there is precedence for Sass syntax with `min` and `max`, and while it is not an elegant solution, using an uppercase letter (e.g. `Max(1em, 20px)`) bypasses the Sass function and resolves to the CSS one. While newer, modular versions of Sass address this conflict with namespaces, I'm sure I am not the only developer who still use an older version of Sass with this conflict on some projects  and bypass it with such hacks.

**Could it be as simple as ensuring CSS parses `@If` properly, since Sass ignores it?** (though I note that my code beautifier, Prettify, currently converts this to lowercase `@if` automatically, so this might need some coordination…) It's not a solution in itself but it would allow for a transition period, kind of what is [described by](https://github.com/w3c/csswg-drafts/issues/6684#issuecomment-1063892265) @bramus.

It would be best if the Sass team didn't have to rework a ton of parsing logic, but I do also see the "nice" aspect of `@if`. But then again, `@when` doesn't bother me, despite the temporal notion that has been mentioned. Just figured I'd mention this "band-aid" solution.

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


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

Received on Monday, 14 March 2022 21:59:39 UTC