css-declaration-sorter
Advanced tools
Comparing version
@@ -5,2 +5,6 @@ # Changelog | ||
## [5.1.1] - 2020-02-07 | ||
### Fixed | ||
- Handling vendor prefixed declarations such as `-moz-animation` when sorting with `keepOverrides` enabled. | ||
## [5.1.0] - 2020-02-06 | ||
@@ -60,2 +64,3 @@ ### Changed | ||
[5.1.1]: https://github.com/Siilwyn/css-declaration-sorter/compare/v5.1.0...v5.1.1 | ||
[5.1.0]: https://github.com/Siilwyn/css-declaration-sorter/compare/v5.0.0...v5.1.0 | ||
@@ -62,0 +67,0 @@ [5.0.0]: https://github.com/Siilwyn/css-declaration-sorter/compare/v4.0.1...v5.0.0 |
{ | ||
"name": "css-declaration-sorter", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "Sorts CSS declarations fast and automatically in a certain order.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -114,3 +114,3 @@ <img alt='CSS declaration sorter logo' src='https://raw.githubusercontent.com/Siilwyn/css-declaration-sorter/master/logo.svg?sanitize=true' height='260' align='right'> | ||
To prevent breaking legacy CSS where shorthand declarations override longhand declarations this option can enabled. For example `animation-name: some; animation: greeting;` will be kept in this order when `keepOverrides` is `true`. | ||
To prevent breaking legacy CSS where shorthand declarations override longhand declarations (also taking into account vendor prefixes) this option can enabled. For example `animation-name: some; animation: greeting;` will be kept in this order when `keepOverrides` is `true`. | ||
@@ -117,0 +117,0 @@ [PostCSS]: https://github.com/postcss/postcss |
@@ -121,2 +121,5 @@ 'use strict'; | ||
return function (a, b) { | ||
a = postcss.vendor.unprefixed(a); | ||
b = postcss.vendor.unprefixed(b); | ||
if (shorthandData[a] && shorthandData[a].includes(b)) return 0; | ||
@@ -123,0 +126,0 @@ if (shorthandData[b] && shorthandData[b].includes(a)) return 0; |
35860
0.99%1243
0.16%