JSPM

  • Created
  • Published
  • Downloads 14285362
  • Score
    100M100P100Q240030F
  • License MIT

Ensure values are ordered consistently in your CSS.

Package Exports

  • postcss-ordered-values

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-ordered-values) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

postcss-ordered-values Build Status NPM version Dependency Status

Ensure values are ordered consistently in your CSS.

Install

With npm do:

npm install postcss-ordered-values --save

Example

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.

Input

h1 {
    border: solid 1px red;
    border: red solid 1px;
    border: 1px solid red;
}

Output

h1 {
    border: 1px solid red;
    border: 1px solid red;
    border: 1px solid red;
}

Usage

See the PostCSS documentation for examples for your environment.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs