Skip to content

Commit d17d1f0

Browse files
committed
Add CSS2 types
1 parent 80f06eb commit d17d1f0

10 files changed

+191
-65
lines changed

baselines/dom.generated.d.ts

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,48 +2753,48 @@ interface CSSStyleDeclaration {
27532753
backgroundRepeat: string | null;
27542754
backgroundSize: string | null;
27552755
baselineShift: string | null;
2756-
border: string | null;
2757-
borderBottom: string | null;
2758-
borderBottomColor: string | null;
2756+
border: string;
2757+
borderBottom: string;
2758+
borderBottomColor: string;
27592759
borderBottomLeftRadius: string | null;
27602760
borderBottomRightRadius: string | null;
2761-
borderBottomStyle: string | null;
2762-
borderBottomWidth: string | null;
2763-
borderCollapse: string | null;
2764-
borderColor: string | null;
2761+
borderBottomStyle: string;
2762+
borderBottomWidth: string;
2763+
borderCollapse: string;
2764+
borderColor: string;
27652765
borderImage: string | null;
27662766
borderImageOutset: string | null;
27672767
borderImageRepeat: string | null;
27682768
borderImageSlice: string | null;
27692769
borderImageSource: string | null;
27702770
borderImageWidth: string | null;
2771-
borderLeft: string | null;
2772-
borderLeftColor: string | null;
2773-
borderLeftStyle: string | null;
2774-
borderLeftWidth: string | null;
2771+
borderLeft: string;
2772+
borderLeftColor: string;
2773+
borderLeftStyle: string;
2774+
borderLeftWidth: string;
27752775
borderRadius: string | null;
2776-
borderRight: string | null;
2777-
borderRightColor: string | null;
2778-
borderRightStyle: string | null;
2779-
borderRightWidth: string | null;
2780-
borderSpacing: string | null;
2781-
borderStyle: string | null;
2782-
borderTop: string | null;
2783-
borderTopColor: string | null;
2776+
borderRight: string;
2777+
borderRightColor: string;
2778+
borderRightStyle: string;
2779+
borderRightWidth: string;
2780+
borderSpacing: string;
2781+
borderStyle: string;
2782+
borderTop: string;
2783+
borderTopColor: string;
27842784
borderTopLeftRadius: string | null;
27852785
borderTopRightRadius: string | null;
2786-
borderTopStyle: string | null;
2787-
borderTopWidth: string | null;
2788-
borderWidth: string | null;
2789-
bottom: string | null;
2786+
borderTopStyle: string;
2787+
borderTopWidth: string;
2788+
borderWidth: string;
2789+
bottom: string;
27902790
boxShadow: string | null;
27912791
boxSizing: string;
27922792
breakAfter: string | null;
27932793
breakBefore: string | null;
27942794
breakInside: string | null;
2795-
captionSide: string | null;
2795+
captionSide: string;
27962796
caretColor: string;
2797-
clear: string | null;
2797+
clear: string;
27982798
clip: string;
27992799
clipPath: string;
28002800
clipRule: string;
@@ -2810,16 +2810,16 @@ interface CSSStyleDeclaration {
28102810
columnSpan: string;
28112811
columnWidth: string;
28122812
columns: string;
2813-
content: string | null;
2814-
counterIncrement: string | null;
2815-
counterReset: string | null;
2813+
content: string;
2814+
counterIncrement: string;
2815+
counterReset: string;
28162816
cssFloat: string | null;
28172817
cssText: string;
28182818
cursor: string;
28192819
direction: string;
2820-
display: string | null;
2820+
display: string;
28212821
dominantBaseline: string | null;
2822-
emptyCells: string | null;
2822+
emptyCells: string;
28232823
enableBackground: string | null;
28242824
fill: string | null;
28252825
fillOpacity: string | null;
@@ -2832,6 +2832,7 @@ interface CSSStyleDeclaration {
28322832
flexGrow: string | null;
28332833
flexShrink: string | null;
28342834
flexWrap: string | null;
2835+
float: string;
28352836
floodColor: string;
28362837
floodOpacity: string;
28372838
font: string;
@@ -2871,7 +2872,7 @@ interface CSSStyleDeclaration {
28712872
gridTemplateAreas: string | null;
28722873
gridTemplateColumns: string | null;
28732874
gridTemplateRows: string | null;
2874-
height: string | null;
2875+
height: string;
28752876
hyphens: string;
28762877
imageOrientation: string;
28772878
imageRendering: string;
@@ -2885,21 +2886,21 @@ interface CSSStyleDeclaration {
28852886
layoutGridLine: string | null;
28862887
layoutGridMode: string | null;
28872888
layoutGridType: string | null;
2888-
left: string | null;
2889+
left: string;
28892890
readonly length: number;
28902891
letterSpacing: string;
28912892
lightingColor: string;
28922893
lineBreak: string;
2893-
lineHeight: string | null;
2894-
listStyle: string | null;
2895-
listStyleImage: string | null;
2896-
listStylePosition: string | null;
2897-
listStyleType: string | null;
2898-
margin: string | null;
2899-
marginBottom: string | null;
2900-
marginLeft: string | null;
2901-
marginRight: string | null;
2902-
marginTop: string | null;
2894+
lineHeight: string;
2895+
listStyle: string;
2896+
listStyleImage: string;
2897+
listStylePosition: string;
2898+
listStyleType: string;
2899+
margin: string;
2900+
marginBottom: string;
2901+
marginLeft: string;
2902+
marginRight: string;
2903+
marginTop: string;
29032904
marker: string | null;
29042905
markerEnd: string | null;
29052906
markerMid: string | null;
@@ -2911,10 +2912,10 @@ interface CSSStyleDeclaration {
29112912
maskRepeat: string;
29122913
maskSize: string;
29132914
maskType: string;
2914-
maxHeight: string | null;
2915-
maxWidth: string | null;
2916-
minHeight: string | null;
2917-
minWidth: string | null;
2915+
maxHeight: string;
2916+
maxWidth: string;
2917+
minHeight: string;
2918+
minWidth: string;
29182919
msContentZoomChaining: string | null;
29192920
msContentZoomLimit: string | null;
29202921
msContentZoomLimitMax: any;
@@ -2966,7 +2967,7 @@ interface CSSStyleDeclaration {
29662967
objectPosition: string;
29672968
opacity: string | null;
29682969
order: string | null;
2969-
orphans: string | null;
2970+
orphans: string;
29702971
outline: string;
29712972
outlineColor: string;
29722973
outlineOffset: string;
@@ -2977,14 +2978,14 @@ interface CSSStyleDeclaration {
29772978
overflowWrap: string;
29782979
overflowX: string;
29792980
overflowY: string;
2980-
padding: string | null;
2981-
paddingBottom: string | null;
2982-
paddingLeft: string | null;
2983-
paddingRight: string | null;
2984-
paddingTop: string | null;
2985-
pageBreakAfter: string | null;
2986-
pageBreakBefore: string | null;
2987-
pageBreakInside: string | null;
2981+
padding: string;
2982+
paddingBottom: string;
2983+
paddingLeft: string;
2984+
paddingRight: string;
2985+
paddingTop: string;
2986+
pageBreakAfter: string;
2987+
pageBreakBefore: string;
2988+
pageBreakInside: string;
29882989
readonly parentRule: CSSRule;
29892990
penAction: string | null;
29902991
perspective: string | null;
@@ -2993,10 +2994,10 @@ interface CSSStyleDeclaration {
29932994
placeItems: string;
29942995
placeSelf: string;
29952996
pointerEvents: string | null;
2996-
position: string | null;
2997-
quotes: string | null;
2997+
position: string;
2998+
quotes: string;
29982999
resize: string;
2999-
right: string | null;
3000+
right: string;
30003001
rotate: string | null;
30013002
rowGap: string;
30023003
rubyAlign: string | null;
@@ -3015,7 +3016,7 @@ interface CSSStyleDeclaration {
30153016
strokeOpacity: string | null;
30163017
strokeWidth: string | null;
30173018
tabSize: string;
3018-
tableLayout: string | null;
3019+
tableLayout: string;
30193020
textAlign: string;
30203021
textAlignLast: string;
30213022
textAnchor: string | null;
@@ -3037,7 +3038,7 @@ interface CSSStyleDeclaration {
30373038
textShadow: string;
30383039
textTransform: string;
30393040
textUnderlinePosition: string;
3040-
top: string | null;
3041+
top: string;
30413042
touchAction: string;
30423043
transform: string;
30433044
transformBox: string;
@@ -3051,8 +3052,8 @@ interface CSSStyleDeclaration {
30513052
translate: string | null;
30523053
unicodeBidi: string;
30533054
userSelect: string;
3054-
verticalAlign: string | null;
3055-
visibility: string | null;
3055+
verticalAlign: string;
3056+
visibility: string;
30563057
/** @deprecated */
30573058
webkitAlignContent: string;
30583059
/** @deprecated */
@@ -3208,14 +3209,14 @@ interface CSSStyleDeclaration {
32083209
webkitUserSelect: string | null;
32093210
webkitWritingMode: string | null;
32103211
whiteSpace: string;
3211-
widows: string | null;
3212-
width: string | null;
3212+
widows: string;
3213+
width: string;
32133214
willChange: string;
32143215
wordBreak: string;
32153216
wordSpacing: string;
32163217
wordWrap: string;
32173218
writingMode: string;
3218-
zIndex: string | null;
3219+
zIndex: string;
32193220
zoom: string | null;
32203221
getPropertyPriority(propertyName: string): string;
32213222
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
@@ -76,6 +76,38 @@
7676
"url": "https://www.w3.org/TR/css-writing-modes-3/",
7777
"title": "CSS Writing Modes"
7878
},
79+
{
80+
"url": "https://www.w3.org/TR/CSS22/box.html",
81+
"title": "CSS2 Box"
82+
},
83+
{
84+
"url": "https://www.w3.org/TR/CSS22/generate.html",
85+
"title": "CSS2 Generated content"
86+
},
87+
{
88+
"url": "https://www.w3.org/TR/CSS22/page.html",
89+
"title": "CSS2 Paged media"
90+
},
91+
{
92+
"url": "https://www.w3.org/TR/CSS22/tables.html",
93+
"title": "CSS2 Tables"
94+
},
95+
{
96+
"url": "https://www.w3.org/TR/CSS22/text.html",
97+
"title": "CSS2 Text"
98+
},
99+
{
100+
"url": "https://www.w3.org/TR/CSS22/visufx.html",
101+
"title": "CSS2 Visual effect"
102+
},
103+
{
104+
"url": "https://www.w3.org/TR/CSS22/visuren.html",
105+
"title": "CSS2 Visual formatting"
106+
},
107+
{
108+
"url": "https://www.w3.org/TR/CSS22/visudet.html",
109+
"title": "CSS2 Visual formatting details"
110+
},
79111
{
80112
"url": "https://w3c.github.io/deviceorientation/",
81113
"title": "DeviceOrientation Event"

0 commit comments

Comments
 (0)