postcss-ordered-values

Ensure values are ordered consistently in your CSS.

MIT 59 个版本
安装
npm install postcss-ordered-values
yarn add postcss-ordered-values
pnpm add postcss-ordered-values
bun add postcss-ordered-values
README

postcss-ordered-values

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.

Input

h1 {
    border: solid 1px red;
    border: red solid .5em;
    border: rgba(0, 30, 105, 0.8) solid 1px;
    border: 1px solid red;
}

Output

h1 {
    border: 1px solid red;
    border: .5em solid red;
    border: 1px solid rgba(0, 30, 105, 0.8);
    border: 1px solid red;
}

Support List

For more examples, see the tests.

  • animation, -webkit-animation
  • border(border-left|right|top|bottom)
  • box-shadow
  • outline
  • flex-flow
  • transition, -webkit-transition

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

版本列表
8.0.1 2026-06-11
8.0.0 2026-05-06
7.0.4 2026-05-02
7.0.3 2026-04-20
7.0.2 2025-05-06
7.0.1 2024-06-19
7.0.0 2024-04-24
6.0.2 2024-03-06
6.0.1 2023-12-14
6.0.0 2023-03-27
5.1.3 2022-06-18
5.1.2 2022-06-03
5.1.1 2022-03-21
5.1.0 2022-03-01
5.0.5 2022-02-07
5.0.4 2022-01-23
5.0.3 2022-01-07
5.0.2 2021-06-10
5.0.1 2021-05-19
5.0.0-rc.2 2021-03-15
5.0.0-rc.1 2021-03-05
5.0.0-rc.0 2021-02-19
5.0.0 2021-04-10
4.1.2 2019-02-12
4.1.1 2018-09-24
4.1.0 2018-08-24
4.0.0-rc.2 2017-08-06
4.0.0-rc.0 2017-06-01
4.0.0 2018-07-04
2.2.3 2017-01-10
2.2.2 2016-09-08
2.2.1 2016-05-17
2.2.0 2016-05-17
2.1.1 2016-05-10
2.1.0 2016-02-10
2.0.2 2015-10-06
2.0.1 2015-09-08
2.0.0 2015-09-04
1.1.1 2015-08-24
1.1.0 2015-08-21
1.0.1 2015-08-20
1.0.0 2015-08-19