postcss-csscomb
v4.0.0
Published
PostCSS plugin to apply CSScomb
Downloads
536
Maintainers
Readme
postcss-csscomb
PostCSS plugin to apply CSScomb.
Install
npm install --save-dev postcss postcss-csscomb
Usage
import postcss from 'postcss';
import csscomb from 'postcss-csscomb';
const css = `.foo {
color: red;
display: block;
}`;
// to use preset config
postcss([csscomb('zen')])
.process(css)
.then(result => {
console.log(result.css);
// .foo {
// display: block;
// color: red;
// }
});
// pass an config as object
const option = {
'sort-order': ['display', 'color']
};
postcss([csscomb(option)])
.process(css)
.then(result => {
console.log(result.css);
// .foo {
// display: block;
// color: red;
// }
});