Skip to content

Commit b43ea6d

Browse files
saschanazsandersn
authored andcommitted
Add CSS2 types (#723)
1 parent 7851a48 commit b43ea6d

10 files changed

+170
-44
lines changed

baselines/dom.generated.d.ts

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ interface CSSStyleDeclaration {
27692769
borderBottomRightRadius: string;
27702770
borderBottomStyle: string;
27712771
borderBottomWidth: string;
2772-
borderCollapse: string | null;
2772+
borderCollapse: string;
27732773
borderColor: string;
27742774
borderImage: string;
27752775
borderImageOutset: string;
@@ -2794,7 +2794,7 @@ interface CSSStyleDeclaration {
27942794
borderRightColor: string;
27952795
borderRightStyle: string;
27962796
borderRightWidth: string;
2797-
borderSpacing: string | null;
2797+
borderSpacing: string;
27982798
borderStyle: string;
27992799
borderTop: string;
28002800
borderTopColor: string;
@@ -2803,15 +2803,15 @@ interface CSSStyleDeclaration {
28032803
borderTopStyle: string;
28042804
borderTopWidth: string;
28052805
borderWidth: string;
2806-
bottom: string | null;
2806+
bottom: string;
28072807
boxShadow: string;
28082808
boxSizing: string;
28092809
breakAfter: string | null;
28102810
breakBefore: string | null;
28112811
breakInside: string | null;
2812-
captionSide: string | null;
2812+
captionSide: string;
28132813
caretColor: string;
2814-
clear: string | null;
2814+
clear: string;
28152815
clip: string;
28162816
clipPath: string;
28172817
clipRule: string;
@@ -2827,16 +2827,16 @@ interface CSSStyleDeclaration {
28272827
columnSpan: string;
28282828
columnWidth: string;
28292829
columns: string;
2830-
content: string | null;
2831-
counterIncrement: string | null;
2832-
counterReset: string | null;
2830+
content: string;
2831+
counterIncrement: string;
2832+
counterReset: string;
28332833
cssFloat: string | null;
28342834
cssText: string;
28352835
cursor: string;
28362836
direction: string;
2837-
display: string | null;
2837+
display: string;
28382838
dominantBaseline: string;
2839-
emptyCells: string | null;
2839+
emptyCells: string;
28402840
enableBackground: string | null;
28412841
fill: string;
28422842
fillOpacity: string;
@@ -2849,6 +2849,7 @@ interface CSSStyleDeclaration {
28492849
flexGrow: string;
28502850
flexShrink: string;
28512851
flexWrap: string;
2852+
float: string;
28522853
floodColor: string;
28532854
floodOpacity: string;
28542855
font: string;
@@ -2888,7 +2889,7 @@ interface CSSStyleDeclaration {
28882889
gridTemplateAreas: string;
28892890
gridTemplateColumns: string;
28902891
gridTemplateRows: string;
2891-
height: string | null;
2892+
height: string;
28922893
hyphens: string;
28932894
imageOrientation: string;
28942895
imageRendering: string;
@@ -2903,25 +2904,25 @@ interface CSSStyleDeclaration {
29032904
layoutGridLine: string | null;
29042905
layoutGridMode: string | null;
29052906
layoutGridType: string | null;
2906-
left: string | null;
2907+
left: string;
29072908
readonly length: number;
29082909
letterSpacing: string;
29092910
lightingColor: string;
29102911
lineBreak: string;
2911-
lineHeight: string | null;
2912-
listStyle: string | null;
2913-
listStyleImage: string | null;
2914-
listStylePosition: string | null;
2915-
listStyleType: string | null;
2916-
margin: string | null;
2912+
lineHeight: string;
2913+
listStyle: string;
2914+
listStyleImage: string;
2915+
listStylePosition: string;
2916+
listStyleType: string;
2917+
margin: string;
29172918
marginBlockEnd: string;
29182919
marginBlockStart: string;
2919-
marginBottom: string | null;
2920+
marginBottom: string;
29202921
marginInlineEnd: string;
29212922
marginInlineStart: string;
2922-
marginLeft: string | null;
2923-
marginRight: string | null;
2924-
marginTop: string | null;
2923+
marginLeft: string;
2924+
marginRight: string;
2925+
marginTop: string;
29252926
marker: string | null;
29262927
markerEnd: string | null;
29272928
markerMid: string | null;
@@ -2934,13 +2935,13 @@ interface CSSStyleDeclaration {
29342935
maskSize: string;
29352936
maskType: string;
29362937
maxBlockSize: string;
2937-
maxHeight: string | null;
2938+
maxHeight: string;
29382939
maxInlineSize: string;
2939-
maxWidth: string | null;
2940+
maxWidth: string;
29402941
minBlockSize: string;
2941-
minHeight: string | null;
2942+
minHeight: string;
29422943
minInlineSize: string;
2943-
minWidth: string | null;
2944+
minWidth: string;
29442945
msContentZoomChaining: string | null;
29452946
msContentZoomLimit: string | null;
29462947
msContentZoomLimitMax: any;
@@ -2992,7 +2993,7 @@ interface CSSStyleDeclaration {
29922993
objectPosition: string;
29932994
opacity: string | null;
29942995
order: string;
2995-
orphans: string | null;
2996+
orphans: string;
29962997
outline: string;
29972998
outlineColor: string;
29982999
outlineOffset: string;
@@ -3003,18 +3004,18 @@ interface CSSStyleDeclaration {
30033004
overflowWrap: string;
30043005
overflowX: string;
30053006
overflowY: string;
3006-
padding: string | null;
3007+
padding: string;
30073008
paddingBlockEnd: string;
30083009
paddingBlockStart: string;
3009-
paddingBottom: string | null;
3010+
paddingBottom: string;
30103011
paddingInlineEnd: string;
30113012
paddingInlineStart: string;
3012-
paddingLeft: string | null;
3013-
paddingRight: string | null;
3014-
paddingTop: string | null;
3015-
pageBreakAfter: string | null;
3016-
pageBreakBefore: string | null;
3017-
pageBreakInside: string | null;
3013+
paddingLeft: string;
3014+
paddingRight: string;
3015+
paddingTop: string;
3016+
pageBreakAfter: string;
3017+
pageBreakBefore: string;
3018+
pageBreakInside: string;
30183019
readonly parentRule: CSSRule;
30193020
penAction: string | null;
30203021
perspective: string | null;
@@ -3023,10 +3024,10 @@ interface CSSStyleDeclaration {
30233024
placeItems: string;
30243025
placeSelf: string;
30253026
pointerEvents: string | null;
3026-
position: string | null;
3027-
quotes: string | null;
3027+
position: string;
3028+
quotes: string;
30283029
resize: string;
3029-
right: string | null;
3030+
right: string;
30303031
rotate: string | null;
30313032
rowGap: string;
30323033
rubyAlign: string | null;
@@ -3045,7 +3046,7 @@ interface CSSStyleDeclaration {
30453046
strokeOpacity: string;
30463047
strokeWidth: string;
30473048
tabSize: string;
3048-
tableLayout: string | null;
3049+
tableLayout: string;
30493050
textAlign: string;
30503051
textAlignLast: string;
30513052
textAnchor: string | null;
@@ -3067,7 +3068,7 @@ interface CSSStyleDeclaration {
30673068
textShadow: string;
30683069
textTransform: string;
30693070
textUnderlinePosition: string;
3070-
top: string | null;
3071+
top: string;
30713072
touchAction: string;
30723073
transform: string;
30733074
transformBox: string;
@@ -3082,7 +3083,7 @@ interface CSSStyleDeclaration {
30823083
unicodeBidi: string;
30833084
userSelect: string;
30843085
verticalAlign: string;
3085-
visibility: string | null;
3086+
visibility: string;
30863087
/** @deprecated */
30873088
webkitAlignContent: string;
30883089
/** @deprecated */
@@ -3238,14 +3239,14 @@ interface CSSStyleDeclaration {
32383239
webkitUserSelect: string | null;
32393240
webkitWritingMode: string | null;
32403241
whiteSpace: string;
3241-
widows: string | null;
3242-
width: string | null;
3242+
widows: string;
3243+
width: string;
32433244
willChange: string;
32443245
wordBreak: string;
32453246
wordSpacing: string;
32463247
wordWrap: string;
32473248
writingMode: string;
3248-
zIndex: string | null;
3249+
zIndex: string;
32493250
zoom: string | null;
32503251
getPropertyPriority(propertyName: string): string;
32513252
getPropertyValue(propertyName: string): string;

inputfiles/idl/CSS2 Box.widl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marginTop;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marginBottom;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marginRight;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marginLeft;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString margin;
7+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paddingTop;
8+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paddingRight;
9+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paddingBottom;
10+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paddingLeft;
11+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString padding;
12+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderTopWidth;
13+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderRightWidth;
14+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderBottomWidth;
15+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderLeftWidth;
16+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderWidth;
17+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderTopColor;
18+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderRightColor;
19+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderBottomColor;
20+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderLeftColor;
21+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderColor;
22+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderTopStyle;
23+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderRightStyle;
24+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderBottomStyle;
25+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderLeftStyle;
26+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderStyle;
27+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderTop;
28+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderRight;
29+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderBottom;
30+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderLeft;
31+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString border;
32+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString content;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString quotes;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString counterReset;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString counterIncrement;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString listStyleType;
7+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString listStyleImage;
8+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString listStylePosition;
9+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString listStyle;
10+
};

inputfiles/idl/CSS2 Paged media.widl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString pageBreakBefore;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString pageBreakAfter;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString pageBreakInside;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString orphans;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString widows;
7+
};

inputfiles/idl/CSS2 Tables.widl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString captionSide;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString tableLayout;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderCollapse;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString borderSpacing;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString emptyCells;
7+
};

inputfiles/idl/CSS2 Text.widl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textIndent;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textAlign;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textDecoration;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString letterSpacing;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString wordSpacing;
7+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textTransform;
8+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString whiteSpace;
9+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString overflow;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString clip;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString visibility;
5+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString width;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString minWidth;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maxWidth;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString height;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString minHeight;
7+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString maxHeight;
8+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString lineHeight;
9+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString verticalAlign;
10+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
partial interface CSSStyleDeclaration {
2+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString display;
3+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString position;
4+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString top;
5+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString right;
6+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString bottom;
7+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString left;
8+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString _float;
9+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString clear;
10+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString zIndex;
11+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString direction;
12+
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString unicodeBidi;
13+
};

inputfiles/idlSources.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,38 @@
104104
"url": "https://www.w3.org/TR/css-writing-modes-3/",
105105
"title": "CSS Writing Modes"
106106
},
107+
{
108+
"url": "https://www.w3.org/TR/CSS22/box.html",
109+
"title": "CSS2 Box"
110+
},
111+
{
112+
"url": "https://www.w3.org/TR/CSS22/generate.html",
113+
"title": "CSS2 Generated content"
114+
},
115+
{
116+
"url": "https://www.w3.org/TR/CSS22/page.html",
117+
"title": "CSS2 Paged media"
118+
},
119+
{
120+
"url": "https://www.w3.org/TR/CSS22/tables.html",
121+
"title": "CSS2 Tables"
122+
},
123+
{
124+
"url": "https://www.w3.org/TR/CSS22/text.html",
125+
"title": "CSS2 Text"
126+
},
127+
{
128+
"url": "https://www.w3.org/TR/CSS22/visufx.html",
129+
"title": "CSS2 Visual effect"
130+
},
131+
{
132+
"url": "https://www.w3.org/TR/CSS22/visuren.html",
133+
"title": "CSS2 Visual formatting"
134+
},
135+
{
136+
"url": "https://www.w3.org/TR/CSS22/visudet.html",
137+
"title": "CSS2 Visual formatting details"
138+
},
107139
{
108140
"url": "https://w3c.github.io/deviceorientation/",
109141
"title": "DeviceOrientation Event"

0 commit comments

Comments
 (0)