1 | # [postcss][postcss]-ordered-values [![Build Status](https://travis-ci.org/ben-eb/postcss-ordered-values.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-ordered-values.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-ordered-values.svg)][deps]
|
2 |
|
3 | > Ensure values are ordered consistently in your CSS.
|
4 |
|
5 | ## Install
|
6 |
|
7 | With [npm](https://npmjs.org/package/postcss-ordered-values) do:
|
8 |
|
9 | ```
|
10 | npm install postcss-ordered-values --save
|
11 | ```
|
12 |
|
13 | ## Example
|
14 |
|
15 | Some CSS properties accept their values in an arbitrary order; for this reason,
|
16 | it is entirely possible that different developers will write their values in
|
17 | different orders. This module normalizes the order, making it easier for other
|
18 | modules to understand which declarations are duplicates.
|
19 |
|
20 | ### Input
|
21 |
|
22 | ```css
|
23 | h1 {
|
24 | border: solid 1px red;
|
25 | border: red solid .5em;
|
26 | border: rgba(0, 30, 105, 0.8) solid 1px;
|
27 | border: 1px solid red;
|
28 | }
|
29 | ```
|
30 |
|
31 | ### Output
|
32 |
|
33 | ```css
|
34 | h1 {
|
35 | border: 1px solid red;
|
36 | border: .5em solid red;
|
37 | border: 1px solid rgba(0, 30, 105, 0.8);
|
38 | border: 1px solid red;
|
39 | }
|
40 | ```
|
41 |
|
42 | ## Support List
|
43 |
|
44 | For more examples, see the [tests](src/__tests__/index.js).
|
45 |
|
46 | * `border(border-left|right|top|bottom)`
|
47 | * `box-shadow`
|
48 | * `outline`
|
49 | * `flex-flow`
|
50 | * `transition`, `-webkit-transition`
|
51 |
|
52 | ## Usage
|
53 |
|
54 | See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
55 | examples for your environment.
|
56 |
|
57 | ## Contributing
|
58 |
|
59 | Pull requests are welcome. If you add functionality, then please add unit tests
|
60 | to cover it.
|
61 |
|
62 | ## License
|
63 |
|
64 | MIT © [Ben Briggs](http://beneb.info)
|
65 |
|
66 | [ci]: https://travis-ci.org/ben-eb/postcss-ordered-values
|
67 | [deps]: https://gemnasium.com/ben-eb/postcss-ordered-values
|
68 | [npm]: http://badge.fury.io/js/postcss-ordered-values
|
69 | [postcss]: https://github.com/postcss/postcss
|