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

> There is a reason Sass syntax clashes with CSS syntax: these are the most reasonable syntax choices and Sass simply got there first and will always get there first

Er, no? Sass is the only one of the major CSS pre-processing languages to use this specific type of construct. It's like saying JSX is the most reasonable syntax choice for using JavaScript because of React's popularity.  `@if` / `@else` would be entirely new paradigms to how CSS stylesheets are evaluated. Where they are _not_ new is specifically for Sass users. I mean, it's okay for CSS authors to say that particular pieces of syntax a pre-processor uses might make sense to port to CSS. But let's not be disingenuous in then pretending like that pre-processor and those users aren't part of the reason. `@if` / `@else` at-rules are not the "obvious" solution to conditionals; they are one of many ways that open source authors have introduced this concept to styling / stylesheets. I'm not saying it's not a _good_ idea. (I mean, I don't think it's a good idea, but that's beside the point.) I'm just saying it's not an obvious idea, like this invention would have somehow manifested in CSS were it not for Sass.

Since the prior art for this is Sass and specifically Sass, it seems bizarre to implement something in CSS because of Sass, and at the same time, do it in a way that specifically breaks things for Sass users. Like, who is this feature for, if not, primarily, Sass users?

> just like now it's unthinkable that CSS might ever want to add a looping construct. When it does...

Please god please no for the love of god no.

Do people not get
how incredibly hard
it is for many newbies to CSS to wrap their brains around layout paradigms and box models and grid and flex layout algorithms and the cascade and now cascade layers BEFORE you turn CSS into an entirely new scripting language?? JavaScript is RIGHT THERE. Figure out how to get CSS to TALK TO JAVASCRIPT.  Importing Sass program flow into CSS has no inherent value in a browser environment when there's ALREADY A SCRIPTING LANGUAGE PRESENT.  WE DON'T NEED TWO SCRIPTING LANGUAGES IN THE BROWSER. `</rant>`

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


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

Received on Wednesday, 23 March 2022 04:55:46 UTC