Re: [csswg-drafts] [css-nesting] Conflicts in proposal with Sass/Less

> On the other hand, as expressed in the previous thread, the Sass maintainers consider that syntax (building up a single simple selector thru concatenation of characters) to have been a serious mistake that they wish they could undo

AFAIK, the Less maintainers do not. 🤷‍♂️ 

> @chriseppstein explicitly stated that he's happy that CSS Nesting is rejecting this possibility.

I don't disagree. As I said, class name manipulation is best left up to a CSS preprocessor. CSS should deal with complete selectors.

> Also, this proposal is even further away from current preprocessor syntax, so I don't think it satisfies your original goal either.

That was kind of my point. Echoing the syntax of preprocessors but producing a different outcome is semantically confusing. It would be the same if CSS had adopted `@var` or `$var` for variable names vs `--var`, but had changed the way those vars are evaluated. Moving further away from current preprocessor syntax should be the goal of this proposal IMO.

Don't get me wrong. All the CSS preprocessing languages take risks every time syntax is invented that's co-mingled with regular CSS, and that's not necessarily the CSS WG's responsibility to avoid it. I'm just calling for pragmatism, and helping provide an avenue for preprocessors to actually support native nesting, if adopted. The way the proposal sits now, it's not really possible to support it in the preprocessor, which, while not your problem, perhaps unnecessarily limits the goal of it actually being used.

 And while I'm an advocate of Less, to me `&` natively in CSS is kind of clunky. Ultimately, my spitballed proposed may not be workable, but it's sort of beside my main point, which is that `&` is problematic. That's my main point.

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

Received on Thursday, 19 July 2018 21:02:44 UTC