Skip to content

Commit a58ea6f

Browse files
committed
Update autoprefixer data for text-decoration
Fixes parcel-bundler#411. Based on postcss/autoprefixer#1478
1 parent 0e84e8e commit a58ea6f

File tree

5 files changed

+230
-99
lines changed

5 files changed

+230
-99
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@codemirror/theme-one-dark": "^6.1.0",
4848
"@mdn/browser-compat-data": "^5.1.6",
4949
"@napi-rs/cli": "^2.14.0",
50-
"autoprefixer": "^10.4.8",
50+
"autoprefixer": "^10.4.13",
5151
"codemirror": "^6.0.1",
5252
"cssnano": "^5.0.8",
5353
"esbuild": "^0.13.10",

src/compat.rs

Lines changed: 40 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl Feature {
292292
}
293293
}
294294
if let Some(version) = browsers.android {
295-
if version < 6750208 {
295+
if version < 7077888 {
296296
return false;
297297
}
298298
}
@@ -384,7 +384,7 @@ impl Feature {
384384
}
385385
}
386386
if let Some(version) = browsers.android {
387-
if version < 6750208 {
387+
if version < 7077888 {
388388
return false;
389389
}
390390
}
@@ -429,7 +429,7 @@ impl Feature {
429429
}
430430
}
431431
if let Some(version) = browsers.android {
432-
if version < 6750208 {
432+
if version < 7077888 {
433433
return false;
434434
}
435435
}
@@ -492,7 +492,7 @@ impl Feature {
492492
}
493493
}
494494
if let Some(version) = browsers.android {
495-
if version < 6750208 {
495+
if version < 7077888 {
496496
return false;
497497
}
498498
}
@@ -537,7 +537,7 @@ impl Feature {
537537
}
538538
}
539539
if let Some(version) = browsers.android {
540-
if version < 6750208 {
540+
if version < 7077888 {
541541
return false;
542542
}
543543
}
@@ -582,7 +582,7 @@ impl Feature {
582582
}
583583
}
584584
if let Some(version) = browsers.android {
585-
if version < 6750208 {
585+
if version < 7077888 {
586586
return false;
587587
}
588588
}
@@ -627,7 +627,7 @@ impl Feature {
627627
}
628628
}
629629
if let Some(version) = browsers.android {
630-
if version < 6750208 {
630+
if version < 7077888 {
631631
return false;
632632
}
633633
}
@@ -719,7 +719,7 @@ impl Feature {
719719
}
720720
}
721721
if let Some(version) = browsers.android {
722-
if version < 6750208 {
722+
if version < 7077888 {
723723
return false;
724724
}
725725
}
@@ -764,7 +764,7 @@ impl Feature {
764764
}
765765
}
766766
if let Some(version) = browsers.android {
767-
if version < 6750208 {
767+
if version < 7077888 {
768768
return false;
769769
}
770770
}
@@ -838,7 +838,7 @@ impl Feature {
838838
}
839839
}
840840
if let Some(version) = browsers.android {
841-
if version < 6750208 {
841+
if version < 7077888 {
842842
return false;
843843
}
844844
}
@@ -883,7 +883,7 @@ impl Feature {
883883
}
884884
}
885885
if let Some(version) = browsers.android {
886-
if version < 6750208 {
886+
if version < 7077888 {
887887
return false;
888888
}
889889
}
@@ -973,7 +973,7 @@ impl Feature {
973973
}
974974
}
975975
if let Some(version) = browsers.android {
976-
if version < 6750208 {
976+
if version < 7077888 {
977977
return false;
978978
}
979979
}
@@ -1018,7 +1018,7 @@ impl Feature {
10181018
}
10191019
}
10201020
if let Some(version) = browsers.android {
1021-
if version < 6750208 {
1021+
if version < 7077888 {
10221022
return false;
10231023
}
10241024
}
@@ -1032,26 +1032,11 @@ impl Feature {
10321032
}
10331033
}
10341034
Feature::CssAutofill => {
1035-
if let Some(version) = browsers.chrome {
1036-
if version < 6291456 {
1037-
return false;
1038-
}
1039-
}
1040-
if let Some(version) = browsers.edge {
1041-
if version < 6291456 {
1042-
return false;
1043-
}
1044-
}
10451035
if let Some(version) = browsers.firefox {
10461036
if version < 5636096 {
10471037
return false;
10481038
}
10491039
}
1050-
if let Some(version) = browsers.opera {
1051-
if version < 5373952 {
1052-
return false;
1053-
}
1054-
}
10551040
if let Some(version) = browsers.safari {
10561041
if version < 983040 {
10571042
return false;
@@ -1062,12 +1047,13 @@ impl Feature {
10621047
return false;
10631048
}
10641049
}
1065-
if let Some(version) = browsers.android {
1066-
if version < 6750208 {
1067-
return false;
1068-
}
1069-
}
1070-
if browsers.ie.is_some() || browsers.samsung.is_some() {
1050+
if browsers.android.is_some()
1051+
|| browsers.chrome.is_some()
1052+
|| browsers.edge.is_some()
1053+
|| browsers.ie.is_some()
1054+
|| browsers.opera.is_some()
1055+
|| browsers.samsung.is_some()
1056+
{
10711057
return false;
10721058
}
10731059
}
@@ -1150,7 +1136,7 @@ impl Feature {
11501136
}
11511137
}
11521138
if let Some(version) = browsers.android {
1153-
if version < 6750208 {
1139+
if version < 7077888 {
11541140
return false;
11551141
}
11561142
}
@@ -1195,7 +1181,7 @@ impl Feature {
11951181
}
11961182
}
11971183
if let Some(version) = browsers.android {
1198-
if version < 6750208 {
1184+
if version < 7077888 {
11991185
return false;
12001186
}
12011187
}
@@ -1243,7 +1229,7 @@ impl Feature {
12431229
}
12441230
}
12451231
if let Some(version) = browsers.android {
1246-
if version < 6750208 {
1232+
if version < 7077888 {
12471233
return false;
12481234
}
12491235
}
@@ -1257,6 +1243,11 @@ impl Feature {
12571243
}
12581244
}
12591245
Feature::CssHas => {
1246+
if let Some(version) = browsers.edge {
1247+
if version < 6881280 {
1248+
return false;
1249+
}
1250+
}
12601251
if let Some(version) = browsers.chrome {
12611252
if version < 6881280 {
12621253
return false;
@@ -1267,18 +1258,22 @@ impl Feature {
12671258
return false;
12681259
}
12691260
}
1261+
if let Some(version) = browsers.opera {
1262+
if version < 5963776 {
1263+
return false;
1264+
}
1265+
}
12701266
if let Some(version) = browsers.ios_saf {
12711267
if version < 984064 {
12721268
return false;
12731269
}
12741270
}
1275-
if browsers.android.is_some()
1276-
|| browsers.edge.is_some()
1277-
|| browsers.firefox.is_some()
1278-
|| browsers.ie.is_some()
1279-
|| browsers.opera.is_some()
1280-
|| browsers.samsung.is_some()
1281-
{
1271+
if let Some(version) = browsers.android {
1272+
if version < 7077888 {
1273+
return false;
1274+
}
1275+
}
1276+
if browsers.firefox.is_some() || browsers.ie.is_some() || browsers.samsung.is_some() {
12821277
return false;
12831278
}
12841279
}
@@ -1314,7 +1309,7 @@ impl Feature {
13141309
}
13151310
}
13161311
if let Some(version) = browsers.android {
1317-
if version < 6750208 {
1312+
if version < 7077888 {
13181313
return false;
13191314
}
13201315
}

src/lib.rs

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11449,7 +11449,6 @@ mod tests {
1144911449
indoc! {r#"
1145011450
.foo {
1145111451
-webkit-text-decoration: underline dotted;
11452-
-moz-text-decoration: underline dotted;
1145311452
text-decoration: underline dotted;
1145411453
}
1145511454
"#},
@@ -11542,12 +11541,12 @@ mod tests {
1154211541
r#"
1154311542
.foo {
1154411543
-webkit-text-decoration: underline dotted;
11545-
-moz-text-decoration: underline dotted;
1154611544
text-decoration: underline dotted;
1154711545
}
1154811546
"#,
1154911547
indoc! {r#"
1155011548
.foo {
11549+
-webkit-text-decoration: underline dotted;
1155111550
text-decoration: underline dotted;
1155211551
}
1155311552
"#},
@@ -11558,6 +11557,62 @@ mod tests {
1155811557
},
1155911558
);
1156011559

11560+
prefix_test(
11561+
r#"
11562+
.foo {
11563+
text-decoration: double underline;
11564+
}
11565+
"#,
11566+
indoc! {r#"
11567+
.foo {
11568+
-webkit-text-decoration: underline double;
11569+
text-decoration: underline double;
11570+
}
11571+
"#},
11572+
Browsers {
11573+
safari: Some(16 << 16),
11574+
..Browsers::default()
11575+
},
11576+
);
11577+
11578+
prefix_test(
11579+
r#"
11580+
.foo {
11581+
text-decoration: underline;
11582+
text-decoration-style: double;
11583+
}
11584+
"#,
11585+
indoc! {r#"
11586+
.foo {
11587+
-webkit-text-decoration: underline double;
11588+
text-decoration: underline double;
11589+
}
11590+
"#},
11591+
Browsers {
11592+
safari: Some(16 << 16),
11593+
..Browsers::default()
11594+
},
11595+
);
11596+
11597+
prefix_test(
11598+
r#"
11599+
.foo {
11600+
text-decoration: underline;
11601+
text-decoration-color: red;
11602+
}
11603+
"#,
11604+
indoc! {r#"
11605+
.foo {
11606+
-webkit-text-decoration: underline red;
11607+
text-decoration: underline red;
11608+
}
11609+
"#},
11610+
Browsers {
11611+
safari: Some(16 << 16),
11612+
..Browsers::default()
11613+
},
11614+
);
11615+
1156111616
prefix_test(
1156211617
r#"
1156311618
.foo {
@@ -11567,7 +11622,6 @@ mod tests {
1156711622
indoc! {r#"
1156811623
.foo {
1156911624
-webkit-text-decoration: var(--test);
11570-
-moz-text-decoration: var(--test);
1157111625
text-decoration: var(--test);
1157211626
}
1157311627
"#},
@@ -11596,10 +11650,8 @@ mod tests {
1159611650
indoc! {r#"
1159711651
.foo {
1159811652
-webkit-text-decoration: underline #ee00be;
11599-
-moz-text-decoration: underline #ee00be;
1160011653
text-decoration: underline #ee00be;
1160111654
-webkit-text-decoration: underline lch(50.998% 135.363 338);
11602-
-moz-text-decoration: underline lch(50.998% 135.363 338);
1160311655
text-decoration: underline lch(50.998% 135.363 338);
1160411656
}
1160511657
"#},

0 commit comments

Comments
 (0)