Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

PostCSS?

Has anybody heard of or used PostCSS? https://github.com/postcss/postcss It claims that it can do all the things that Sass/Less/Stylus do, but much faster and only uses JS plugins (no Ruby dependencies). Is this the future of CSS preprocessing? And if anyone uses it - do you have to use different syntax?

1 Answer

Codin - Codesmite
Codin - Codesmite
8,600 Points

In my opinion if a CSS framework requires Javascript to function is not the future of CSS. The future of CSS in my opnion is a pure CSS framework or version that can do all the things PostCSS boasts without needing to use Javascript.

This obviously would require more CSS standards introduced to browsers but we are slowly getting there, CSS3 and HTML5 have already progressed the amount that can be done with pure CSS and HTML leaps and bounds to the point Flash/Shockwave/Actionscript/Silverlight are pretty much redundant, maybe someday Javascript/jQuery will be redundant due to the advances in CSS, HTML and Web Browsers standards.

I certainly understand where you're coming from, but I'm not sure that the functionality of preprocessors like Sass and Less could be replicated with pure CSS.
Certain aspects of CSS preprocessors may get integrated into browsers or new versions of CSS, but this would take many many years. If we aren't willing to wait, we can either use preprocessors or write (and figure out a reliable way to organize) vanilla CSS. I've found Sass to make writing CSS simpler and more enjoyable. Along with its many helpful functionalities, it compiles valid CSS and I can use in projects right now. PostCSS seems to do the same thing, but faster and without a ruby dependency.

Codin - Codesmite
Codin - Codesmite
8,600 Points

I think i'm just sick of going to work on other peoples half done projects to find a mess of illedgible compiled-CSS. Pre-proccessors and Post-proccessors are pretty cool and have their uses but time after time I jump on a project to help another designer finish in time or just because they need help and I find myself spending 3-4 hours refactoring all their work because compiled-CSS in the hands of someone that doesn't fully know how it works ends up a complete mess.

I don't think any Pre-Proccessor or Post-Proccessor will be the future of CSS, it's the present and if you mostly write vanilla CSS like myself and do all my own Javascript Post-Processing and server side programming it just seems a pointless tool that is missused by the majority that actually use it.

I would rather just see Vanilla CSS expand to incorporate its own from of proccessor that does the same but cleaner and more controlled.

Mixins are evil and just duplicate unnecessary code leaving your styles sheets twice the size they should be and a mess to anyone that need to edit them.

Extends are also evil on large projects as you end up with css files with 1000-2000 selectors that crash everything or slow load times.

Pretty much anything you can do in SASS or PostCSS or whatever proccessor you are using can be written just as quickly but cleaner and more maintanence freindly in vanilla CSS.