Skip to content

Commit b658cb9

Browse files
committed
Update compat data
1 parent c1c67e0 commit b658cb9

File tree

5 files changed

+230
-124
lines changed

5 files changed

+230
-124
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
"detect-libc": "^1.0.3"
4141
},
4242
"devDependencies": {
43-
"@mdn/browser-compat-data": "^4.1.12",
43+
"@mdn/browser-compat-data": "^5.1.6",
4444
"@napi-rs/cli": "^2.6.2",
45-
"autoprefixer": "^10.4.4",
46-
"caniuse-lite": "^1.0.30001319",
45+
"autoprefixer": "^10.4.8",
46+
"caniuse-lite": "^1.0.30001373",
4747
"cssnano": "^5.0.8",
4848
"esbuild": "^0.13.10",
4949
"jest-diff": "^27.4.2",

scripts/build-prefixes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const BROWSER_MAPPING = {
1616
bb: null,
1717
kaios: null,
1818
op_mini: null,
19+
oculus: null,
1920
};
2021

2122
const MDN_BROWSER_MAPPING = {
@@ -24,7 +25,8 @@ const MDN_BROWSER_MAPPING = {
2425
opera_android: 'opera',
2526
safari_ios: 'ios_saf',
2627
samsunginternet_android: 'samsung',
27-
webview_android: 'android'
28+
webview_android: 'android',
29+
oculus: null,
2830
};
2931

3032
// Caniuse data for clip-path is incorrect.
@@ -56,8 +58,6 @@ prefixes['any-pseudo'] = {
5658
})
5759
}
5860

59-
console.log(prefixes['any-pseudo'])
60-
6161
let flexSpec = {};
6262
let oldGradient = {};
6363
let p = new Map();
@@ -69,7 +69,7 @@ for (let prop in prefixes) {
6969
continue;
7070
}
7171
let prefix = browsers[name].prefix_exceptions?.[version] || browsers[name].prefix;
72-
72+
7373
// https://github.com/postcss/autoprefixer/blob/main/lib/hacks/backdrop-filter.js#L11
7474
if (prefix === 'ms' && prop === 'backdrop-filter') {
7575
prefix = 'webkit';
@@ -225,7 +225,7 @@ let mdnFeatures = {
225225
labColors: mdn.css.types.color.lab.__compat.support,
226226
oklabColors: {},
227227
colorFunction: mdn.css.types.color.color.__compat.support,
228-
spaceSeparatedColorFunction: mdn.css.types.color.space_separated_functional_notation.__compat.support,
228+
spaceSeparatedColorFunction: mdn.css.types.color.rgb.space_separated_parameters.__compat.support,
229229
textDecorationThicknessPercent: mdn.css.properties['text-decoration-thickness'].percentage.__compat.support,
230230
textDecorationThicknessShorthand: mdn.css.properties['text-decoration']['text-decoration-thickness'].__compat.support,
231231
cue: mdn.css.selectors.cue.__compat.support,

src/compat.rs

Lines changed: 83 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl Feature {
290290
}
291291
}
292292
if let Some(version) = browsers.android {
293-
if version < 6488064 {
293+
if version < 6750208 {
294294
return false;
295295
}
296296
}
@@ -382,7 +382,7 @@ impl Feature {
382382
}
383383
}
384384
if let Some(version) = browsers.android {
385-
if version < 6488064 {
385+
if version < 6750208 {
386386
return false;
387387
}
388388
}
@@ -427,7 +427,7 @@ impl Feature {
427427
}
428428
}
429429
if let Some(version) = browsers.android {
430-
if version < 6488064 {
430+
if version < 6750208 {
431431
return false;
432432
}
433433
}
@@ -490,7 +490,7 @@ impl Feature {
490490
}
491491
}
492492
if let Some(version) = browsers.android {
493-
if version < 6488064 {
493+
if version < 6750208 {
494494
return false;
495495
}
496496
}
@@ -535,7 +535,7 @@ impl Feature {
535535
}
536536
}
537537
if let Some(version) = browsers.android {
538-
if version < 6488064 {
538+
if version < 6750208 {
539539
return false;
540540
}
541541
}
@@ -580,7 +580,7 @@ impl Feature {
580580
}
581581
}
582582
if let Some(version) = browsers.android {
583-
if version < 6488064 {
583+
if version < 6750208 {
584584
return false;
585585
}
586586
}
@@ -625,7 +625,7 @@ impl Feature {
625625
}
626626
}
627627
if let Some(version) = browsers.android {
628-
if version < 6488064 {
628+
if version < 6750208 {
629629
return false;
630630
}
631631
}
@@ -717,7 +717,7 @@ impl Feature {
717717
}
718718
}
719719
if let Some(version) = browsers.android {
720-
if version < 6488064 {
720+
if version < 6750208 {
721721
return false;
722722
}
723723
}
@@ -762,7 +762,7 @@ impl Feature {
762762
}
763763
}
764764
if let Some(version) = browsers.android {
765-
if version < 6488064 {
765+
if version < 6750208 {
766766
return false;
767767
}
768768
}
@@ -836,7 +836,7 @@ impl Feature {
836836
}
837837
}
838838
if let Some(version) = browsers.android {
839-
if version < 6488064 {
839+
if version < 6750208 {
840840
return false;
841841
}
842842
}
@@ -881,7 +881,7 @@ impl Feature {
881881
}
882882
}
883883
if let Some(version) = browsers.android {
884-
if version < 6488064 {
884+
if version < 6750208 {
885885
return false;
886886
}
887887
}
@@ -971,7 +971,7 @@ impl Feature {
971971
}
972972
}
973973
if let Some(version) = browsers.android {
974-
if version < 6488064 {
974+
if version < 6750208 {
975975
return false;
976976
}
977977
}
@@ -1016,7 +1016,7 @@ impl Feature {
10161016
}
10171017
}
10181018
if let Some(version) = browsers.android {
1019-
if version < 6488064 {
1019+
if version < 6750208 {
10201020
return false;
10211021
}
10221022
}
@@ -1061,7 +1061,7 @@ impl Feature {
10611061
}
10621062
}
10631063
if let Some(version) = browsers.android {
1064-
if version < 6488064 {
1064+
if version < 6750208 {
10651065
return false;
10661066
}
10671067
}
@@ -1148,7 +1148,7 @@ impl Feature {
11481148
}
11491149
}
11501150
if let Some(version) = browsers.android {
1151-
if version < 6488064 {
1151+
if version < 6750208 {
11521152
return false;
11531153
}
11541154
}
@@ -1193,7 +1193,7 @@ impl Feature {
11931193
}
11941194
}
11951195
if let Some(version) = browsers.android {
1196-
if version < 6488064 {
1196+
if version < 6750208 {
11971197
return false;
11981198
}
11991199
}
@@ -1241,7 +1241,7 @@ impl Feature {
12411241
}
12421242
}
12431243
if let Some(version) = browsers.android {
1244-
if version < 6488064 {
1244+
if version < 6750208 {
12451245
return false;
12461246
}
12471247
}
@@ -1255,6 +1255,11 @@ impl Feature {
12551255
}
12561256
}
12571257
Feature::CssHas => {
1258+
if let Some(version) = browsers.chrome {
1259+
if version < 6881280 {
1260+
return false;
1261+
}
1262+
}
12581263
if let Some(version) = browsers.safari {
12591264
if version < 984064 {
12601265
return false;
@@ -1266,7 +1271,6 @@ impl Feature {
12661271
}
12671272
}
12681273
if browsers.android.is_some()
1269-
|| browsers.chrome.is_some()
12701274
|| browsers.edge.is_some()
12711275
|| browsers.firefox.is_some()
12721276
|| browsers.ie.is_some()
@@ -1308,7 +1312,7 @@ impl Feature {
13081312
}
13091313
}
13101314
if let Some(version) = browsers.android {
1311-
if version < 6553600 {
1315+
if version < 6750208 {
13121316
return false;
13131317
}
13141318
}
@@ -1537,14 +1541,22 @@ impl Feature {
15371541
}
15381542
}
15391543
Feature::MediaRangeSyntax => {
1544+
if let Some(version) = browsers.chrome {
1545+
if version < 6815744 {
1546+
return false;
1547+
}
1548+
}
15401549
if let Some(version) = browsers.firefox {
15411550
if version < 4128768 {
15421551
return false;
15431552
}
15441553
}
1545-
if browsers.android.is_some()
1546-
|| browsers.chrome.is_some()
1547-
|| browsers.edge.is_some()
1554+
if let Some(version) = browsers.android {
1555+
if version < 6815744 {
1556+
return false;
1557+
}
1558+
}
1559+
if browsers.edge.is_some()
15481560
|| browsers.ie.is_some()
15491561
|| browsers.ios_saf.is_some()
15501562
|| browsers.opera.is_some()
@@ -1554,7 +1566,7 @@ impl Feature {
15541566
return false;
15551567
}
15561568
}
1557-
Feature::LogicalBorders | Feature::LogicalMargin | Feature::LogicalPadding => {
1569+
Feature::LogicalBorders => {
15581570
if let Some(version) = browsers.chrome {
15591571
if version < 4521984 {
15601572
return false;
@@ -1616,7 +1628,7 @@ impl Feature {
16161628
}
16171629
}
16181630
if let Some(version) = browsers.opera {
1619-
if version < 3145728 {
1631+
if version < 4063232 {
16201632
return false;
16211633
}
16221634
}
@@ -1689,6 +1701,51 @@ impl Feature {
16891701
return false;
16901702
}
16911703
}
1704+
Feature::LogicalMargin | Feature::LogicalPadding => {
1705+
if let Some(version) = browsers.chrome {
1706+
if version < 5701632 {
1707+
return false;
1708+
}
1709+
}
1710+
if let Some(version) = browsers.edge {
1711+
if version < 5701632 {
1712+
return false;
1713+
}
1714+
}
1715+
if let Some(version) = browsers.firefox {
1716+
if version < 2686976 {
1717+
return false;
1718+
}
1719+
}
1720+
if let Some(version) = browsers.opera {
1721+
if version < 4063232 {
1722+
return false;
1723+
}
1724+
}
1725+
if let Some(version) = browsers.safari {
1726+
if version < 786688 {
1727+
return false;
1728+
}
1729+
}
1730+
if let Some(version) = browsers.ios_saf {
1731+
if version < 786944 {
1732+
return false;
1733+
}
1734+
}
1735+
if let Some(version) = browsers.samsung {
1736+
if version < 917504 {
1737+
return false;
1738+
}
1739+
}
1740+
if let Some(version) = browsers.android {
1741+
if version < 5701632 {
1742+
return false;
1743+
}
1744+
}
1745+
if browsers.ie.is_some() {
1746+
return false;
1747+
}
1748+
}
16921749
Feature::LogicalInset => {
16931750
if let Some(version) = browsers.chrome {
16941751
if version < 5701632 {
@@ -1981,7 +2038,7 @@ impl Feature {
19812038
}
19822039
}
19832040
if let Some(version) = browsers.android {
1984-
if version < 2424832 {
2041+
if version < 263168 {
19852042
return false;
19862043
}
19872044
}
@@ -2021,7 +2078,7 @@ impl Feature {
20212078
}
20222079
}
20232080
if let Some(version) = browsers.android {
2024-
if version < 2424832 {
2081+
if version < 263168 {
20252082
return false;
20262083
}
20272084
}

0 commit comments

Comments
 (0)