postcss-ordered-values
Ensure values are ordered consistently in your CSS.
With npm do:
npm install postcss-ordered-values --save
Some CSS properties accept their values in an arbitrary order; for this reason, it is entirely possible that different developers will write their values in different orders. This module normalizes the order, making it easier for other modules to understand which declarations are duplicates.
Currently, border
& outline
are supported. For more examples, see
the tests.
h1 {
border: solid 1px red;
border: red solid 1px;
border: 1px solid red;
}
h1 {
border: 1px solid red;
border: 1px solid red;
border: 1px solid red;
}
See the PostCSS documentation for examples for your environment.
Pull requests are welcome. If you add functionality, then please add unit tests to cover it.
MIT © Ben Briggs