Recess* Property Order ![StyleLint](https://s3.amazonaws.com/media-p.slid.es/uploads/467124/images/2872758/stylelint-icon-black.svg)
![github issues](https://img.shields.io/github/issues/stormwarning/stylelint-config-recess-order.svg?style=flat-square)
A Stylelint config that sorts CSS properties the way Recess did and
Bootstrap did/does.
*With some modifications & additions for modern properties.
Usage
- Add stylelint and this package to your project:
npm install --save-dev stylelint stylelint-config-recess-order
- Configure your stylelint configuration file to extend this package:
module.exports = {
extends: ['stylelint-config-recess-order'],
rules: {
},
}
Advanced
The default setup applies only the 'order/properties-order'
rule with the various property groups. If you need to configure other options for this rule,
the groups can be imported separately and the rule configured to your needs.
const propertyGroups = require('stylelint-config-recess-order/groups')
module.exports = {
extends: [],
rules: {
'order/properties-order': propertyGroups.map((group) => ({
...group,
emptyLineBefore: 'always',
noEmptyLineBetween: true,
})),
},
}
References
@mdo on CSS Property Order