-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(postcss-ordered-values): incorrect order when using calc for anim…
…ation property (#1629)
- Loading branch information
Showing
3 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict'; | ||
const { test } = require('node:test'); | ||
const assert = require('node:assert/strict'); | ||
const postcss = require('postcss'); | ||
const preset = require('cssnano-preset-default'); | ||
const nano = require('..'); | ||
|
||
const fixture = ` | ||
.b { | ||
animation: opacity 0ms calc(1000ms); | ||
} | ||
`; | ||
|
||
const expected = '.b{animation:opacity 0ms calc(1s)}'; | ||
|
||
test('it should keep quote', () => { | ||
const processor = postcss([ | ||
nano({ | ||
preset: preset({ calc: false }), | ||
}), | ||
]); | ||
|
||
return processor | ||
.process(fixture, { from: undefined }) | ||
.then((r) => assert.strictEqual(r.css, expected)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters