Hacker News new | ask | show | jobs
by menor 4037 days ago
I looked into this for my current project, but in my opinion you have to leave behind too many things if you do this instead of Sass. Namely:

-No mixins

-No maps

-No loops and conditionals

Maybe a couple of years ago, but now that libsass runs so fast I still don't see the point of using this.

4 comments

Because you're writing standards-track CSS. That's the reason. If that doesn't appeal to you, then that's understandable. It does appeal to some, myself included.

In addition, it's built using PostCSS (meaning you can use cssnext as a plugin into PostCSS.) Using PostCSS you can achieve all of your bullet points. Today.

Of course that this can appeal to people, I'm just curious about what I'm missing. That PostCSS looks more useful to me, you're right. What is the alternative to the standards-track CSS that could benefit from this?
A lot of people stopped using those things. With a good methodology and a UI component approach, you will find yourself to not need mixins loops etc.

I stopped using Sass some years ago and I can definitly live without those features. Maybe one missing thing is extend, but it's comming, a CSS spec is in draft ;)

Have you abandoned preprocessors altogether?
Yep! Some example are http://cssrecipes.github.io/ (from me & friends) and http://www.basscss.com/
The point of using it is to get back to native CSS, and restrict yourself to features that improve simplicity, adaptability and architecture of large CSS code bases.

Using a nice component based architecture (perhaps like SUITCSS) and this you can write really maintainable CSS, that can be understood by everyone, now and in the future, not just those that have learnt Sass.

Using a nice component based architecture and Sass you can also achieve the same, for me is more maintainable changing a key value in a map and having a new type of button generated than having to copy/paste the rules. And I think learning Sass is not that difficult if you already know css.

Not having lots of nested divs with lots of class names also helps to code readability and maintainability if you use something like React with JSX.

I see advantages in not needing to precompile in the future, but apart from that I see this as a step back, of course it's my opinion, I see how this can work for other people.

Perhaps more importantly no support for partials. But I guess your task runner can deal with that.
You can totally support partials. By default, csssnext inline @import directive. Like all css processors.