stylelint-config-recess-order

Recess-based property sort order for Stylelint.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
stylelint-config-recess-order
332135.0.1a month ago7 years agoMinified + gzip package size for stylelint-config-recess-order in KB

Readme

Recess\* Property Order StyleLintstylelint
!npm versionnpm-imgnpm-url !npm downloadsnpm-dlsnpm-url !github issuesissues-imgissues-url
A Stylelint config that sorts CSS properties the way Recess did and Bootstrap did/does.
\With some modifications & additions for modern properties.

Usage

  1. Add stylelint and this package to your project:
```sh
npm install --save-dev stylelint stylelint-config-recess-order
```
  1. Configure your stylelint configuration file to extend this package:
```js
module.exports = {
	extends: ['stylelint-config-recess-order'],
	rules: {
		// Add overrides and additional rules here
	},
}
```

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: [], // Do not extend the config here.
	rules: {
		// Configure the rule manually.
		'order/properties-order': propertyGroups.map((group) => ({
			...group,
			emptyLineBefore: 'always',
			noEmptyLineBetween: true,
		})),
	},
}

References

@mdo on CSS Property Order
mdo-order