Skip to content

Commit 6fc622d

Browse files
authored
fix(convert-values): exclude linear() from stripping % from value 0 (#1720)
1 parent 73189b8 commit 6fc622d

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/postcss-convert-values/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const keepZeroPercentAlways = new Set([
5050
'hsl',
5151
'hsla',
5252
'hwb',
53+
'linear',
5354
]);
5455

5556
const keepZeroPercentageInKeyframe = new Set([

packages/postcss-convert-values/test/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,11 @@ test(
538538
passthroughCSS('box-shadow:inset 0 0 0 250pc hsla(0,0%,100%,.7215686275)')
539539
);
540540

541+
test(
542+
'should not strip the percentage from linear()',
543+
passthroughCSS('transition-timing-function: linear(0 0%, 1 100%)')
544+
);
545+
541546
test(
542547
'should not strip percentage from border-image-width',
543548
passthroughCSS('@keyframes test {0% {border-image-width: 0 0 100% 0%;}}')

0 commit comments

Comments
 (0)