postcss-prettify

About | Installation | Usage | License
About
A PostCSS plugin to prettify output. Requires at least Node.js v0.12. Should likely be included towards the end of a PostCSS plugin chain, if that's your jam.
Features
- line breaks between top-level rules and comments
- smart spacing around rules and declarations
- indenting with 2 spaces
- one selector per line
Example Input
{}
Example Output
{}
Installation
From a terminal
npm install --save-dev postcss-prettify
Usage
As a PostCSS Plugin
Check the PostCSS docs for your chosen implementation.
Standalone
postcss-prettify
also exposes a standalone PostCSS processor instance as prettify.process(css)
:
var fs = var prettify = fs