
Ask HN: Are you using postcss? - barkerdj
Postcss was meant to be the next iteration after less&#x2F;sass but for me, sass just works really well.<p>I&#x27;m going to keep using sass, but has anybody made the jump and not looked back?<p>Also, am I right in thinking postcss is on the up? I really don&#x27;t hear much about it or see it used in many open source projects.
======
iskin
If you asked about PostCSS-based preprocessors (it is small part of PostCSS
features) — there is a 2 solutions:

* postcss-cssnext, preset of CSS drafts polyfills. It is not 100% preprocessor, but because of CSS custom properties and CSS nested polyfill it could do preprocessor work. * PreCSS, preset of PostCSS plugins with Sass-like features.

I use PreCSS. It is more simple preprocessor. It has no some Sass features by
design, to keep your code clean of code.

Using PreCSS doesn’t give me some addition features, just same old $style
variables, nesting, mixins.

The reason why I use PreCSS — performance and compatibility. If you use
Autoprefixer or Stylelint, you already have PostCSS in your build processor.
In this case, why you should use other parser? PreCSS will share parsing with
Autoprefixer, Stylelint and other PostCSS tools.

PostCSS will parse CSS only once and all that plugins will work on top of same
AST. As result build process will be simpler and faster.

------
robin_reala
I really like a lot of the functionality that PostCSS enables, but currently
the majority of the styles I’m building are packaged to be shipped out for use
by other teams. Relying on PostCSS would mean that I’d be mandating that every
team use it. That’s OK for Sass as nothing useful appears until it’s in your
build chain, but for PostCSS it’d be easy for a team to forget it and ship un-
prefixed and un-minified code for example. At the end of the day that’s worse
for users, and I can’t expect the dev teams I support to be good enough to
notice and understand.

------
iskin
Main reason to use PostCSS is not to replace preprocessor. Main revolution
happens outside a syntax-sugar world right now.

This is why main reason to use PostCSS is to have non-preprocessors tools:

1\. Autoprefixer.

2\. Stylelint. Like ESLint, but for CSS. It will automatically find a mistakes
in your CSS.

3\. postcss-inline-svg, changes a SVG color when you insert it with base64.

4\. CSS Modules, automatically isolate your CSS components (like auto-BEM, but
with better isolation).

5\. postcss-cssnext, if you are fan of CSS Custom Properties and want to use
them right now (for some simple cases, of course there is no dynamic Custom
Properties).

------
iskin
PostCSS is a framework to create a CSS tools. Preprocessors (Sass/Less) is
only one type of tools that you could build on top of PostCSS.

So using PostCSS != not using Sass. You could use Sass for processors, but
still using PostCSS for other CSS tools types — for Autoprefixer, Stylelint,
cssnano.

