Skip to content

stormwarning/stylelint-config-recess-order

Folders and files

NameName
Last commit message
Last commit date

Latest commit

33f7e8d Β· Jan 17, 2025
Jan 17, 2025
Jan 17, 2025
May 28, 2022
Aug 23, 2024
Jan 17, 2025
Aug 23, 2024
Aug 23, 2024
Jan 17, 2025
Mar 13, 2018
Jan 17, 2025
Jul 31, 2020
Dec 21, 2022
Jan 17, 2025
Mar 3, 2024
Jan 17, 2025
Aug 23, 2024

Repository files navigation

Recess* Property Order StyleLint

npm version npm downloads github issues

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:
    npm install --save-dev stylelint stylelint-config-recess-order
  2. Configure your stylelint configuration file to extend this package:
    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