3 ms·
So far, most of the responses are pretty underwhelming. It's like that exercise middle school teachers sometimes do. They had out a worksheet where the directi
by alwillis 4y ago
So far, most of the responses are pretty underwhelming.
It's like that exercise middle school teachers sometimes do. They had out a worksheet where the directions tells the students to put their pencil down and do nothing. The rest of the worksheet is a series of questions or whatever.
80% of the students don't read the directions and start filling out the worksheet while the 20% who did read them are just sitting there.
That's what the feedback to an official CSS Working Group question has been like so far—people responding without having read the article; otherwise, they would know that…
1. Because of the way browsers work, the Sass syntax isn't an option—full stop.
The person who implemented Chromium's nesting support explains in the thread [1] why Sass's syntax is not an option. IMHO trying to revive a discussion about wanting the Sass syntax at this point is unproductive to say the least.
I've been using Sass and Stylus pretty much exclusively for a bunch of years—I get it. But that ship has sailed a long time ago, so let's not spend a lot of time on something that's not going to happen.
2. Perhaps before you respond, you should get up to speed on the issues at hand? There are links in the article you may want to read before you respond.
3. Here's what's arguably the most important thing to consider:
Which is best for the future of CSS? When people write CSS thirty years from
now — long after today’s habits and expectations are completely forgotten,
when future generations have never heard of Sass — which option will make writing
this language easy and elegant?
This requires thinking beyond your personal preferences or what you and your team have been doing for the past 10 years. It's about what's best the future of CSS for the long term.
We weren't writing Sass 20 years ago (Sass made its appearance in 2006) and we won't be writing Sass 20 years from now [2].
If you think about it, nesting is one of the top reasons why devs use Sass today; once CSS nesting is enabled in all three browser engines, a lot of devs won't feel the need to keep using Sass for every project.
I know there are other features and workflows that Sass/Less/Stylus enable but as far as authoring stylesheets goes, nesting is huge.
This isn't like the old days when it took years before you could use new CSS in production—Chrome already has an implementation (I've used it) and once there's agreement on the syntax, I can't see why Apple, Google and Mozilla wouldn't be able to ship it Q1 2023.
So think about what's best for CSS and the web based on where things are headed—this isn't about you. Okay, it's not entirely about you and your team; but it's mostly about us— current and future web developers.
We're going to need to live with this choice for many years to come.
Let's not screw this up.
[1]: https://news.ycombinator.com/item?id=34007053 https://news.ycombinator.com/item?id=34007053
[2]: To be pedantic for a second (this is Hacker News after all ;-)), yes, someone will have to work on some legacy codebase 20 years from now that has thousands of lines of Sass… I get that. But we're getting close to a point in time where the vast majority of new web projects will not need to use Sass.
- philliphaydon 4y agoI read the whole thing. And I don’t care if it doesn’t work or what excuses they make. If it’s not gonna be similar to any existing implementation for doing css then don’t bother doing it. The last thing we need is a shit version of nesting. The syntax we have now is good, it’s what we know, it works. There’s no need for stupid filler syntax to work around scenarios. I.e prefixing with @nest.
- alwillis 4y ago> There’s no need for stupid filler syntax to work around scenarios. I.e prefixing with @nest. Respectfully, we already have @supports, @keyframe, @font-face and several others. Is it really that big a deal?
- gaganyaan 4y agoThis is more vitriol than necessary. The comment you linked to says the bad syntax choices presented in the article would allow for an easier parser implementation, but doesn't really expand on that or give any numbers. If someone thinks that the better syntax is worth a likely imperceptible increase in parsing time, that's hardly worth this harsh comment.
- wruza 4y agoYou browser developers seem to already decided on it, so why asking at all. This “help us to choose but stay silent if you don’t like it” is pointless. I am well-informed on most of these nuances and don’t like any of these options. Will stick with sass unless forced to use some of that, I don’t care which you end up with. My opinion is: provide a slow parser for my kilobytes of “style.kbcss” and do whatever you want with minified bootstrap megabytes and such. If you don’t feel like counting this opinion, fine. Build pipelines or makefile-likes or just a caching middleware is not a deal big enough to make drama out of it. I see why you may find uninformed opinions irritating, but the only constructive thing here is to make your comment softer and put it into the header of that site. People may not visit links, may not understand what/why or may (surprise) not care about implications. If you care to make a poll that excludes some opinions in advance, prepare the auditory correctly.
- 4y ago