@webstudio-is/css-data 0.82.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -21
- package/lib/__generated__/keyword-values.js +38 -2
- package/lib/__generated__/properties.js +101 -11
- package/lib/cjs/__generated__/keyword-values.js +38 -2
- package/lib/cjs/__generated__/properties.js +101 -11
- package/lib/cjs/custom-data.js +64 -0
- package/lib/cjs/html-check.js +23 -0
- package/lib/cjs/html.js +353 -308
- package/lib/cjs/property-parsers/box-shadow.js +1 -0
- package/lib/custom-data.js +44 -0
- package/lib/html-check.js +1 -0
- package/lib/html.js +353 -308
- package/lib/property-parsers/box-shadow.js +1 -0
- package/lib/types/__generated__/keyword-values.d.ts +11 -2
- package/lib/types/__generated__/properties.d.ts +101 -11
- package/lib/types/custom-data.d.ts +15 -0
- package/lib/types/html.d.ts +8 -0
- package/lib/types/index.d.ts +101 -11
- package/package.json +8 -8
- package/src/__generated__/keyword-values.ts +38 -2
- package/src/__generated__/properties.ts +101 -11
- package/src/custom-data.ts +57 -0
- package/src/html.ts +387 -330
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
// This file was generated by pnpm mdn-data
|
|
2
2
|
export const properties = {
|
|
3
|
+
WebkitFontSmoothing: {
|
|
4
|
+
unitGroups: [],
|
|
5
|
+
inherited: true,
|
|
6
|
+
initial: {
|
|
7
|
+
type: "keyword",
|
|
8
|
+
value: "auto",
|
|
9
|
+
},
|
|
10
|
+
popularity: 0.61281794,
|
|
11
|
+
appliesTo: "allElements",
|
|
12
|
+
},
|
|
13
|
+
MozOsxFontSmoothing: {
|
|
14
|
+
unitGroups: [],
|
|
15
|
+
inherited: true,
|
|
16
|
+
initial: {
|
|
17
|
+
type: "keyword",
|
|
18
|
+
value: "auto",
|
|
19
|
+
},
|
|
20
|
+
popularity: 0,
|
|
21
|
+
appliesTo: "allElements",
|
|
22
|
+
},
|
|
3
23
|
accentColor: {
|
|
4
24
|
unitGroups: [],
|
|
5
25
|
inherited: true,
|
|
@@ -938,16 +958,6 @@ export const properties = {
|
|
|
938
958
|
popularity: 0.90791486,
|
|
939
959
|
appliesTo: "allElementsAndText",
|
|
940
960
|
},
|
|
941
|
-
printColorAdjust: {
|
|
942
|
-
unitGroups: [],
|
|
943
|
-
inherited: true,
|
|
944
|
-
initial: {
|
|
945
|
-
type: "keyword",
|
|
946
|
-
value: "economy",
|
|
947
|
-
},
|
|
948
|
-
popularity: 0,
|
|
949
|
-
appliesTo: "allElements",
|
|
950
|
-
},
|
|
951
961
|
colorScheme: {
|
|
952
962
|
unitGroups: [],
|
|
953
963
|
inherited: true,
|
|
@@ -1089,6 +1099,26 @@ export const properties = {
|
|
|
1089
1099
|
popularity: 0,
|
|
1090
1100
|
appliesTo: "elementsForWhichSizeContainmentCanApply",
|
|
1091
1101
|
},
|
|
1102
|
+
containerName: {
|
|
1103
|
+
unitGroups: [],
|
|
1104
|
+
inherited: false,
|
|
1105
|
+
initial: {
|
|
1106
|
+
type: "keyword",
|
|
1107
|
+
value: "none",
|
|
1108
|
+
},
|
|
1109
|
+
popularity: 0,
|
|
1110
|
+
appliesTo: "allElements",
|
|
1111
|
+
},
|
|
1112
|
+
containerType: {
|
|
1113
|
+
unitGroups: [],
|
|
1114
|
+
inherited: false,
|
|
1115
|
+
initial: {
|
|
1116
|
+
type: "keyword",
|
|
1117
|
+
value: "normal",
|
|
1118
|
+
},
|
|
1119
|
+
popularity: 0,
|
|
1120
|
+
appliesTo: "allElements",
|
|
1121
|
+
},
|
|
1092
1122
|
content: {
|
|
1093
1123
|
unitGroups: [],
|
|
1094
1124
|
inherited: false,
|
|
@@ -1107,7 +1137,7 @@ export const properties = {
|
|
|
1107
1137
|
value: "visible",
|
|
1108
1138
|
},
|
|
1109
1139
|
popularity: 0.04199404,
|
|
1110
|
-
appliesTo: "
|
|
1140
|
+
appliesTo: "elementsForWhichSizeContainmentCanApply",
|
|
1111
1141
|
},
|
|
1112
1142
|
counterIncrement: {
|
|
1113
1143
|
unitGroups: ["number"],
|
|
@@ -1301,6 +1331,16 @@ export const properties = {
|
|
|
1301
1331
|
popularity: 0.0006232,
|
|
1302
1332
|
appliesTo: "allElements",
|
|
1303
1333
|
},
|
|
1334
|
+
fontPalette: {
|
|
1335
|
+
unitGroups: [],
|
|
1336
|
+
inherited: true,
|
|
1337
|
+
initial: {
|
|
1338
|
+
type: "keyword",
|
|
1339
|
+
value: "normal",
|
|
1340
|
+
},
|
|
1341
|
+
popularity: 0,
|
|
1342
|
+
appliesTo: "allElementsAndText",
|
|
1343
|
+
},
|
|
1304
1344
|
fontVariationSettings: {
|
|
1305
1345
|
unitGroups: ["number"],
|
|
1306
1346
|
inherited: true,
|
|
@@ -1410,6 +1450,16 @@ export const properties = {
|
|
|
1410
1450
|
popularity: 0.00328361,
|
|
1411
1451
|
appliesTo: "allElements",
|
|
1412
1452
|
},
|
|
1453
|
+
fontVariantEmoji: {
|
|
1454
|
+
unitGroups: [],
|
|
1455
|
+
inherited: true,
|
|
1456
|
+
initial: {
|
|
1457
|
+
type: "keyword",
|
|
1458
|
+
value: "normal",
|
|
1459
|
+
},
|
|
1460
|
+
popularity: 0,
|
|
1461
|
+
appliesTo: "allElementsAndText",
|
|
1462
|
+
},
|
|
1413
1463
|
fontVariantLigatures: {
|
|
1414
1464
|
unitGroups: [],
|
|
1415
1465
|
inherited: true,
|
|
@@ -1590,6 +1640,16 @@ export const properties = {
|
|
|
1590
1640
|
popularity: 0,
|
|
1591
1641
|
appliesTo: "allElements",
|
|
1592
1642
|
},
|
|
1643
|
+
hyphenateLimitChars: {
|
|
1644
|
+
unitGroups: ["number"],
|
|
1645
|
+
inherited: true,
|
|
1646
|
+
initial: {
|
|
1647
|
+
type: "keyword",
|
|
1648
|
+
value: "auto",
|
|
1649
|
+
},
|
|
1650
|
+
popularity: 0,
|
|
1651
|
+
appliesTo: "allElements",
|
|
1652
|
+
},
|
|
1593
1653
|
hyphens: {
|
|
1594
1654
|
unitGroups: [],
|
|
1595
1655
|
inherited: true,
|
|
@@ -2620,6 +2680,16 @@ export const properties = {
|
|
|
2620
2680
|
popularity: 0.82360295,
|
|
2621
2681
|
appliesTo: "allElementsExceptInternalTableDisplayTypes",
|
|
2622
2682
|
},
|
|
2683
|
+
page: {
|
|
2684
|
+
unitGroups: [],
|
|
2685
|
+
inherited: false,
|
|
2686
|
+
initial: {
|
|
2687
|
+
type: "keyword",
|
|
2688
|
+
value: "auto",
|
|
2689
|
+
},
|
|
2690
|
+
popularity: 0.00131264,
|
|
2691
|
+
appliesTo: "blockElementsInNormalFlow",
|
|
2692
|
+
},
|
|
2623
2693
|
pageBreakAfter: {
|
|
2624
2694
|
unitGroups: [],
|
|
2625
2695
|
inherited: false,
|
|
@@ -2711,6 +2781,16 @@ export const properties = {
|
|
|
2711
2781
|
popularity: 0.92435004,
|
|
2712
2782
|
appliesTo: "allElements",
|
|
2713
2783
|
},
|
|
2784
|
+
printColorAdjust: {
|
|
2785
|
+
unitGroups: [],
|
|
2786
|
+
inherited: true,
|
|
2787
|
+
initial: {
|
|
2788
|
+
type: "keyword",
|
|
2789
|
+
value: "economy",
|
|
2790
|
+
},
|
|
2791
|
+
popularity: 0,
|
|
2792
|
+
appliesTo: "allElements",
|
|
2793
|
+
},
|
|
2714
2794
|
quotes: {
|
|
2715
2795
|
unitGroups: [],
|
|
2716
2796
|
inherited: true,
|
|
@@ -3502,6 +3582,16 @@ export const properties = {
|
|
|
3502
3582
|
popularity: 0.84531302,
|
|
3503
3583
|
appliesTo: "inlineLevelAndTableCellElements",
|
|
3504
3584
|
},
|
|
3585
|
+
viewTransitionName: {
|
|
3586
|
+
unitGroups: [],
|
|
3587
|
+
inherited: false,
|
|
3588
|
+
initial: {
|
|
3589
|
+
type: "keyword",
|
|
3590
|
+
value: "none",
|
|
3591
|
+
},
|
|
3592
|
+
popularity: 0,
|
|
3593
|
+
appliesTo: "allElements",
|
|
3594
|
+
},
|
|
3505
3595
|
visibility: {
|
|
3506
3596
|
unitGroups: [],
|
|
3507
3597
|
inherited: true,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { StyleValue } from "./schema";
|
|
2
|
+
import { popularityIndex } from "./popularity-index";
|
|
3
|
+
|
|
4
|
+
// Data type used before we generate a the constants.
|
|
5
|
+
type RawPropertyData = {
|
|
6
|
+
unitGroups: string[];
|
|
7
|
+
inherited: boolean;
|
|
8
|
+
initial: StyleValue;
|
|
9
|
+
popularity: number;
|
|
10
|
+
appliesTo: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const propertiesData: { [property: string]: RawPropertyData } = {};
|
|
14
|
+
export const keywordValues: { [property: string]: Array<string> } = {};
|
|
15
|
+
|
|
16
|
+
const getPopularityIndex = (property: string) =>
|
|
17
|
+
popularityIndex.find((data) => data.property === property)?.dayPercentage ??
|
|
18
|
+
0;
|
|
19
|
+
|
|
20
|
+
propertiesData.WebkitFontSmoothing = {
|
|
21
|
+
unitGroups: [],
|
|
22
|
+
inherited: true,
|
|
23
|
+
initial: {
|
|
24
|
+
type: "keyword",
|
|
25
|
+
value: "auto",
|
|
26
|
+
},
|
|
27
|
+
popularity: getPopularityIndex("webkit-font-smoothing"),
|
|
28
|
+
appliesTo: "allElements",
|
|
29
|
+
};
|
|
30
|
+
keywordValues.WebkitFontSmoothing = [
|
|
31
|
+
"auto",
|
|
32
|
+
"none",
|
|
33
|
+
"antialiased",
|
|
34
|
+
"subpixel-antialiased",
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
propertiesData.MozOsxFontSmoothing = {
|
|
38
|
+
unitGroups: [],
|
|
39
|
+
inherited: true,
|
|
40
|
+
initial: {
|
|
41
|
+
type: "keyword",
|
|
42
|
+
value: "auto",
|
|
43
|
+
},
|
|
44
|
+
popularity: getPopularityIndex("moz-osx-font-smoothing"),
|
|
45
|
+
appliesTo: "allElements",
|
|
46
|
+
};
|
|
47
|
+
keywordValues.MozOsxFontSmoothing = ["auto", "grayscale"];
|
|
48
|
+
|
|
49
|
+
keywordValues.listStyleType = [
|
|
50
|
+
"disc",
|
|
51
|
+
"circle",
|
|
52
|
+
"square",
|
|
53
|
+
"decimal",
|
|
54
|
+
"georgian",
|
|
55
|
+
"trad-chinese-informal",
|
|
56
|
+
"kannada",
|
|
57
|
+
];
|