Skip to content

Commit cbfbd35

Browse files
committed
fix
1 parent ae5a37a commit cbfbd35

4 files changed

Lines changed: 43 additions & 99 deletions

File tree

plugin-packs/postcss-preset-env/test/basic.preserve.false.expect.css

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
}
4545

4646
.test-logical-viewport-units {
47-
width: -webkit-calc(10vw + 5px);
4847
width: -moz-calc(10vw + 5px);
4948
width: calc(10vw + 5px);
5049
}
@@ -198,19 +197,21 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
198197
-moz-animation: none 0s ease 0s 1 normal none running;
199198
animation: none 0s ease 0s 1 normal none running;
200199
-webkit-backface-visibility: visible;
201-
-moz-backface-visibility: visible;
202200
backface-visibility: visible;
203201
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
204202
border: medium none currentcolor;
205203
border-collapse: separate;
206-
-moz-border-image: none;
207-
border-image: none;
204+
-webkit-border-image: none;
205+
-moz-border-image: none;
206+
border-image: none;
208207
border-radius: 0;
209208
border-spacing: 0;
210209
bottom: auto;
211-
box-shadow: none;
212-
-moz-box-sizing: content-box;
213-
box-sizing: content-box;
210+
-webkit-box-shadow: none;
211+
box-shadow: none;
212+
-webkit-box-sizing: content-box;
213+
-moz-box-sizing: content-box;
214+
box-sizing: content-box;
214215
caption-side: top;
215216
clear: none;
216217
clip: auto;
@@ -252,7 +253,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
252253
line-height: normal;
253254
height: auto;
254255
-webkit-hyphens: none;
255-
-moz-hyphens: none;
256256
-ms-hyphens: none;
257257
hyphens: none;
258258
left: auto;
@@ -274,18 +274,17 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
274274
page-break-before: auto;
275275
page-break-inside: auto;
276276
-webkit-perspective: none;
277-
-moz-perspective: none;
278277
perspective: none;
279278
-webkit-perspective-origin: 50% 50%;
280-
-moz-perspective-origin: 50% 50%;
281279
perspective-origin: 50% 50%;
282280
position: static;
283281
right: auto;
284282
-moz-tab-size: 8;
285283
tab-size: 8;
286284
table-layout: auto;
287285
text-align: left;
288-
text-align-last: auto;
286+
-moz-text-align-last: auto;
287+
text-align-last: auto;
289288
-webkit-text-decoration: none;
290289
text-decoration: none;
291290
text-indent: 0;
@@ -299,7 +298,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
299298
-moz-transform-origin: 50% 50% 0;
300299
transform-origin: 50% 50% 0;
301300
-webkit-transform-style: flat;
302-
-moz-transform-style: flat;
303301
transform-style: flat;
304302
-webkit-transition: none 0s ease 0s;
305303
-moz-transition: none 0s ease 0s;
@@ -399,7 +397,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
399397
}
400398

401399
.complex-clamp {
402-
width: max(-webkit-calc(100% - 10px), min(min(10px, 100%), max(40px, 4em)));
403400
width: max(-moz-calc(100% - 10px), min(min(10px, 100%), max(40px, 4em)));
404401
width: max(calc(100% - 10px), min(min(10px, 100%), max(40px, 4em)));
405402
}
@@ -414,13 +411,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
414411
}
415412

416413
.calc-clamp {
417-
margin: 0 40px 0 -webkit-calc(-1 * max(32px, min(16vw, 64px)));
418414
margin: 0 40px 0 -moz-calc(-1 * max(32px, min(16vw, 64px)));
419415
margin: 0 40px 0 calc(-1 * max(32px, min(16vw, 64px)));
420416
}
421417

422418
.multiple-calc-clamp {
423-
margin: -webkit-calc(-1 * max(1px, min(2vw, 3px))) -webkit-calc(-1 * max(4px, min(5vw, 6px)));
424419
margin: -moz-calc(-1 * max(1px, min(2vw, 3px))) -moz-calc(-1 * max(4px, min(5vw, 6px)));
425420
margin: calc(-1 * max(1px, min(2vw, 3px))) calc(-1 * max(4px, min(5vw, 6px)));
426421
}
@@ -570,7 +565,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
570565
text-indent: 2em;
571566
content: var(--value-2ic);
572567
left: 2em;
573-
width: -webkit-calc(8em + 20px);
574568
width: -moz-calc(8em + 20px);
575569
width: calc(8em + 20px);
576570
height: 10px;
@@ -583,7 +577,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
583577
}
584578

585579
.mod {
586-
padding: 8px 3px 1px -webkit-calc(3px + 50%);
587580
padding: 8px 3px 1px -moz-calc(3px + 50%);
588581
padding: 8px 3px 1px calc(3px + 50%);
589582
-webkit-transform: rotate(-50deg);
@@ -593,7 +586,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
593586
}
594587

595588
.rem {
596-
padding: 8px 3px 1px -webkit-calc(3px + 50%);
597589
padding: 8px 3px 1px -moz-calc(3px + 50%);
598590
padding: 8px 3px 1px calc(3px + 50%);
599591
-webkit-transform: rotate(-50deg);
@@ -648,7 +640,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
648640

649641
.nested-calc {
650642
-webkit-box-ordinal-group: NaN;
651-
-webkit-order: -webkit-calc(1 * (8 / 3 + (5 * 10)));
643+
-webkit-order: calc(1 * (8 / 3 + (5 * 10)));
652644
-moz-box-ordinal-group: NaN;
653645
order: calc(1 * (8 / 3 + (5 * 10)));
654646
}

plugin-packs/postcss-preset-env/test/basic.preserve.true.expect.css

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@
5656
}
5757

5858
.test-logical-viewport-units {
59-
width: -webkit-calc(10vw + 5px);
6059
width: -moz-calc(10vw + 5px);
6160
width: calc(10vw + 5px);
62-
width: -webkit-calc(10vi + 5px);
6361
width: -moz-calc(10vi + 5px);
6462
width: calc(10vi + 5px);
6563
}
@@ -269,19 +267,21 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
269267
-moz-animation: none 0s ease 0s 1 normal none running;
270268
animation: none 0s ease 0s 1 normal none running;
271269
-webkit-backface-visibility: visible;
272-
-moz-backface-visibility: visible;
273270
backface-visibility: visible;
274271
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
275272
border: medium none currentcolor;
276273
border-collapse: separate;
277-
-moz-border-image: none;
278-
border-image: none;
274+
-webkit-border-image: none;
275+
-moz-border-image: none;
276+
border-image: none;
279277
border-radius: 0;
280278
border-spacing: 0;
281279
bottom: auto;
282-
box-shadow: none;
283-
-moz-box-sizing: content-box;
284-
box-sizing: content-box;
280+
-webkit-box-shadow: none;
281+
box-shadow: none;
282+
-webkit-box-sizing: content-box;
283+
-moz-box-sizing: content-box;
284+
box-sizing: content-box;
285285
caption-side: top;
286286
clear: none;
287287
clip: auto;
@@ -323,7 +323,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
323323
line-height: normal;
324324
height: auto;
325325
-webkit-hyphens: none;
326-
-moz-hyphens: none;
327326
-ms-hyphens: none;
328327
hyphens: none;
329328
left: auto;
@@ -345,18 +344,17 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
345344
page-break-before: auto;
346345
page-break-inside: auto;
347346
-webkit-perspective: none;
348-
-moz-perspective: none;
349347
perspective: none;
350348
-webkit-perspective-origin: 50% 50%;
351-
-moz-perspective-origin: 50% 50%;
352349
perspective-origin: 50% 50%;
353350
position: static;
354351
right: auto;
355352
-moz-tab-size: 8;
356353
tab-size: 8;
357354
table-layout: auto;
358355
text-align: left;
359-
text-align-last: auto;
356+
-moz-text-align-last: auto;
357+
text-align-last: auto;
360358
-webkit-text-decoration: none;
361359
text-decoration: none;
362360
text-indent: 0;
@@ -370,7 +368,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
370368
-moz-transform-origin: 50% 50% 0;
371369
transform-origin: 50% 50% 0;
372370
-webkit-transform-style: flat;
373-
-moz-transform-style: flat;
374371
transform-style: flat;
375372
-webkit-transition: none 0s ease 0s;
376373
-moz-transition: none 0s ease 0s;
@@ -515,10 +512,8 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
515512
}
516513

517514
.complex-clamp {
518-
width: max(-webkit-calc(100% - 10px), min(min(10px, 100%), max(40px, 4em)));
519515
width: max(-moz-calc(100% - 10px), min(min(10px, 100%), max(40px, 4em)));
520516
width: max(calc(100% - 10px), min(min(10px, 100%), max(40px, 4em)));
521-
width: clamp(-webkit-calc(100% - 10px), min(10px, 100%), max(40px, 4em));
522517
width: clamp(-moz-calc(100% - 10px), min(10px, 100%), max(40px, 4em));
523518
width: clamp(calc(100% - 10px), min(10px, 100%), max(40px, 4em));
524519
}
@@ -536,28 +531,21 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
536531
}
537532

538533
.calc-clamp {
539-
margin: 0 40px 0 -webkit-calc(-1 * max(32px, min(16vw, 64px)));
540534
margin: 0 40px 0 -moz-calc(-1 * max(32px, min(16vw, 64px)));
541535
margin: 0 40px 0 calc(-1 * max(32px, min(16vw, 64px)));
542-
margin: 0 40px 0 -webkit-calc(-1 * clamp(32px, 16vw, 64px));
543536
margin: 0 40px 0 -moz-calc(-1 * clamp(32px, 16vw, 64px));
544537
margin: 0 40px 0 calc(-1 * clamp(32px, 16vw, 64px));
545538
}
546539

547540
.multiple-calc-clamp {
548-
margin: -webkit-calc(-1 * max(1px, min(2vw, 3px))) -webkit-calc(-1 * max(4px, min(5vw, 6px)));
549541
margin: -moz-calc(-1 * max(1px, min(2vw, 3px))) -moz-calc(-1 * max(4px, min(5vw, 6px)));
550542
margin: calc(-1 * max(1px, min(2vw, 3px))) calc(-1 * max(4px, min(5vw, 6px)));
551-
margin: -webkit-calc(-1 * max(1px, min(2vw, 3px))) -webkit-calc(-1 * clamp(4px, 5vw, 6px));
552543
margin: -moz-calc(-1 * max(1px, min(2vw, 3px))) -moz-calc(-1 * clamp(4px, 5vw, 6px));
553544
margin: calc(-1 * max(1px, min(2vw, 3px))) calc(-1 * clamp(4px, 5vw, 6px));
554-
margin: -webkit-calc(-1 * max(4px, min(5vw, 6px))) -webkit-calc(-1 * max(4px, min(5vw, 6px)));
555545
margin: -moz-calc(-1 * max(4px, min(5vw, 6px))) -moz-calc(-1 * max(4px, min(5vw, 6px)));
556546
margin: calc(-1 * max(4px, min(5vw, 6px))) calc(-1 * max(4px, min(5vw, 6px)));
557-
margin: -webkit-calc(-1 * max(4px, min(5vw, 6px))) -webkit-calc(-1 * clamp(4px, 5vw, 6px));
558547
margin: -moz-calc(-1 * max(4px, min(5vw, 6px))) -moz-calc(-1 * clamp(4px, 5vw, 6px));
559548
margin: calc(-1 * max(4px, min(5vw, 6px))) calc(-1 * clamp(4px, 5vw, 6px));
560-
margin: -webkit-calc(-1 * clamp(1px, 2vw, 3px)) -webkit-calc(-1 * clamp(4px, 5vw, 6px));
561549
margin: -moz-calc(-1 * clamp(1px, 2vw, 3px)) -moz-calc(-1 * clamp(4px, 5vw, 6px));
562550
margin: calc(-1 * clamp(1px, 2vw, 3px)) calc(-1 * clamp(4px, 5vw, 6px));
563551
}
@@ -664,7 +652,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
664652
prop-3: rgb(7, 3, 1);
665653
prop-3: color(display-p3 0.02472 0.01150 0.00574 / 1);
666654
prop-4: rgb(7, 3, 1);
667-
prop-4: color(display-p3 0.02472 0.01150 0.00574 / -webkit-calc(33 / 22));
668655
prop-4: color(display-p3 0.02472 0.01150 0.00574 / -moz-calc(33 / 22));
669656
prop-4: color(display-p3 0.02472 0.01150 0.00574 / calc(33 / 22));
670657
prop-5: color(display-p3 1 1 1 1);
@@ -758,26 +745,22 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
758745

759746
.alpha {
760747
color-1: rgba(188, 101, 59, 0.3);
761-
color-1: oklch(from oklch(60% 0.1250 45deg / 0.2) l c h / -webkit-calc(alpha + 0.1));
762748
color-1: oklch(from oklch(60% 0.1250 45deg / 0.2) l c h / -moz-calc(alpha + 0.1));
763749
color-1: oklch(from oklch(60% 0.1250 45deg / 0.2) l c h / calc(alpha + 0.1));
764-
color-1: alpha(from oklch(60% 0.1250 45deg / 0.2) / -webkit-calc(alpha + 0.1));
765750
color-1: alpha(from oklch(60% 0.1250 45deg / 0.2) / -moz-calc(alpha + 0.1));
766751
color-1: alpha(from oklch(60% 0.1250 45deg / 0.2) / calc(alpha + 0.1));
767752
--color-2: rgba(188, 101, 59, 0.3);
768753
}
769754

770755
@supports (color: lab(from red l 1 1% / calc(alpha + 0.1))) and (color: oklab(0% 0 0%)) {
771756
.alpha {
772-
--color-2: oklch(from oklch(60% 0.1250 45deg / 0.2) l c h / -webkit-calc(alpha + 0.1));
773757
--color-2: oklch(from oklch(60% 0.1250 45deg / 0.2) l c h / -moz-calc(alpha + 0.1));
774758
--color-2: oklch(from oklch(60% 0.1250 45deg / 0.2) l c h / calc(alpha + 0.1));
775759
}
776760
}
777761

778762
@supports (color: alpha(from red / 1)) and (color: oklab(0% 0 0%)) {
779763
.alpha {
780-
--color-2: alpha(from oklch(60% 0.1250 45deg / 0.2) / -webkit-calc(alpha + 0.1));
781764
--color-2: alpha(from oklch(60% 0.1250 45deg / 0.2) / -moz-calc(alpha + 0.1));
782765
--color-2: alpha(from oklch(60% 0.1250 45deg / 0.2) / calc(alpha + 0.1));
783766
}
@@ -791,10 +774,8 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
791774
left: 2em;
792775
left: var(--non-existing, 2em);
793776
left: 2ic;
794-
width: -webkit-calc(8em + 20px);
795777
width: -moz-calc(8em + 20px);
796778
width: calc(8em + 20px);
797-
width: -webkit-calc(8ic + 20px);
798779
width: -moz-calc(8ic + 20px);
799780
width: calc(8ic + 20px);
800781
height: 10px;
@@ -816,10 +797,8 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
816797
}
817798

818799
.mod {
819-
padding: 8px 3px 1px -webkit-calc(3px + 50%);
820800
padding: 8px 3px 1px -moz-calc(3px + 50%);
821801
padding: 8px 3px 1px calc(3px + 50%);
822-
padding: 8px mod(18px, 5px) 1px -webkit-calc(mod(15px, 6px) + 50%);
823802
padding: 8px mod(18px, 5px) 1px -moz-calc(mod(15px, 6px) + 50%);
824803
padding: 8px mod(18px, 5px) 1px calc(mod(15px, 6px) + 50%);
825804
-webkit-transform: rotate(-50deg);
@@ -833,10 +812,8 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
833812
}
834813

835814
.rem {
836-
padding: 8px 3px 1px -webkit-calc(3px + 50%);
837815
padding: 8px 3px 1px -moz-calc(3px + 50%);
838816
padding: 8px 3px 1px calc(3px + 50%);
839-
padding: 8px rem(18px, 5px) 1px -webkit-calc(rem(15px, 6px) + 50%);
840817
padding: 8px rem(18px, 5px) 1px -moz-calc(rem(15px, 6px) + 50%);
841818
padding: 8px rem(18px, 5px) 1px calc(rem(15px, 6px) + 50%);
842819
-webkit-transform: rotate(-50deg);
@@ -919,10 +896,10 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
919896

920897
.nested-calc {
921898
-webkit-box-ordinal-group: NaN;
922-
-webkit-order: -webkit-calc(1 * (8 / 3 + (5 * 10)));
899+
-webkit-order: calc(1 * (8 / 3 + (5 * 10)));
923900
-moz-box-ordinal-group: NaN;
924901
order: calc(1 * (8 / 3 + (5 * 10)));
925-
-webkit-order: -webkit-calc(1 * -webkit-calc(8 / 3 + -webkit-calc(5 * 10)));
902+
-webkit-order: calc(1 * calc(8 / 3 + calc(5 * 10)));
926903
order: calc(1 * calc(8 / 3 + calc(5 * 10)));
927904
}
928905

@@ -1088,7 +1065,6 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
10881065

10891066
.exponential-functions {
10901067
width: 8px;
1091-
width: -webkit-calc(1px * pow(2, 3));
10921068
width: -moz-calc(1px * pow(2, 3));
10931069
width: calc(1px * pow(2, 3));
10941070
}

0 commit comments

Comments
 (0)