3.0.9 • Published 20 days ago

@mrhenry/stylelint-mrhenry-prop-order v3.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
20 days ago

@mrhenry/stylelint-mrhenry-prop-order

version

Specify a strict order for CSS properties.

/* valid */
.foo {
	width: 100px;
	height: 20px;
}

/* invalid */
.foo {
	height: 20px; /* we prefer width before height */
	width: 100px;
}
/* valid */
.foo {
	margin: 20px;
	margin-top: 10px;
}

/* invalid */
.foo {
	margin-top: 10px; /* longhand before a shorthand */
	margin: 20px;
}

This package doesn't create groups of properties. But it will respect patterns that are often used to group properties:

  • empty lines
  • comments
  • custom properties
  • vendor prefixed CSS
.foo {
	a: 0; /* section : 1 */
	b: 0; /* section : 1 */

	c: 0; /* section : 2 */
	d: 0; /* section : 2 */
	/* a comment */
	e: 0; /* section : 3 */
	f: 0; /* section : 3 */
	--a: 0; /* ignored */
	--b: 0; /* ignored */
	-webkit-foo: 0; /* ignored */
}

Usage

npm install --save-dev @mrhenry/stylelint-mrhenry-prop-order

// stylelint.config.js
module.exports = {
	plugins: [
		"@mrhenry/stylelint-mrhenry-prop-order",
	],
	rules: {
		"@mrhenry/stylelint-mrhenry-prop-order": true,
	},
}

List of properties :

The list is sourced from @webref/css.

To update properties :

  • npm run update (to get the latest @webref/css)
  • npm run test

This will tell you which properties are missing.

3.0.9

20 days ago

3.0.8

1 month ago

3.0.7

2 months ago

3.0.6

2 months ago

3.0.5

2 months ago

3.0.4

3 months ago

3.0.3

3 months ago

3.0.2

3 months ago

3.0.1

5 months ago

3.0.0

5 months ago

2.0.15

6 months ago

2.0.16

5 months ago

2.0.13

6 months ago

2.0.14

6 months ago

2.0.11

10 months ago

2.0.12

8 months ago

2.0.10

10 months ago

2.0.7

12 months ago

2.0.6

1 year ago

2.0.9

11 months ago

2.0.8

12 months ago

1.0.9

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

1.0.10

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago