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

@LeaVerou I'd agree that Sass should have (and should probably have started with) syntax that could never clash (eg `@_`) with CSS. But that's not where we are now and this is not an ideal world we live in.

I don't think it needs to be a case of bad precedent if Sass maintainers must commit to actively come up with a solution to make language changes that never allow clashes like this in the future (eg changing Sass control structures to `@_`) whether or not `@when` or `@if` is chosen here.

There isn't a way to make that not hard for Sass users and maintainers (well apart from choosing `@when` and just kicking the ball down the road). But I'd concede that Sass maintainers should have some kind of long term plan here and engage on the underlying issue.

Oh and just to point out the number of websites that use a technology is not necessarily the same as the number of front end developers who use a technology and will be impacted by this change.

I really don't feel choosing `@when` is _catastrophic_ for the language or even confusing for users, but I see I'm in the minority. I concede that `@if` would be the more natural choice so if you must, you must 🤷‍♂️ 

@SebastianZ that doesn't solve the backwards compatibility issue, but it does solve the library compatibility issue (ie just a Sass upgrade is needed and third party tools don't need to do anything). However it will be highly confusing and unintuitive for users so a change in Sass syntax should also accompany it (but can continue to support old Scss `@if` alongside in this scenario for a long period?). Not sure if the current Scss parser can be adapted to support differentiating the syntax like this

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


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

Received on Thursday, 17 March 2022 07:31:01 UTC