Skip to content

Commit b576405

Browse files
committed
Migrate CSS
1 parent 428d3a2 commit b576405

File tree

9 files changed

+30
-81
lines changed

9 files changed

+30
-81
lines changed

baselines/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31943,7 +31943,7 @@ declare var StorageManager: {
3194331943
new(): StorageManager;
3194431944
};
3194531945

31946-
/** @deprecated */
31946+
/** @deprecated Do not use */
3194731947
interface StyleMedia {
3194831948
type: string;
3194931949
matchMedium(mediaquery: string): boolean;

baselines/ts5.5/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31918,7 +31918,7 @@ declare var StorageManager: {
3191831918
new(): StorageManager;
3191931919
};
3192031920

31921-
/** @deprecated */
31921+
/** @deprecated Do not use */
3192231922
interface StyleMedia {
3192331923
type: string;
3192431924
matchMedium(mediaquery: string): boolean;

baselines/ts5.6/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31940,7 +31940,7 @@ declare var StorageManager: {
3194031940
new(): StorageManager;
3194131941
};
3194231942

31943-
/** @deprecated */
31943+
/** @deprecated Do not use */
3194431944
interface StyleMedia {
3194531945
type: string;
3194631946
matchMedium(mediaquery: string): boolean;

baselines/ts5.9/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31940,7 +31940,7 @@ declare var StorageManager: {
3194031940
new(): StorageManager;
3194131941
};
3194231942

31943-
/** @deprecated */
31943+
/** @deprecated Do not use */
3194431944
interface StyleMedia {
3194531945
type: string;
3194631946
matchMedium(mediaquery: string): boolean;

inputfiles/addedTypes.jsonc

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,7 @@
100100
]
101101
}
102102
},
103-
"CSSStyleProperties": {
104-
"properties": {
105-
"property": {
106-
"imageOrientation": {
107-
"deprecated": true
108-
},
109-
"wordWrap": {
110-
"deprecated": true
111-
}
112-
}
113-
}
114-
},
103+
115104
"Window": {
116105
"name": "Window",
117106
"methods": {
@@ -376,32 +365,6 @@
376365
]
377366
}
378367
},
379-
// This is used in the React d.ts files, and not including
380-
// it would force an update for anyone using React.
381-
"StyleMedia": {
382-
"name": "StyleMedia",
383-
"exposed": "Window",
384-
"noInterfaceObject": true,
385-
"deprecated": true,
386-
"properties": {
387-
"property": {
388-
"type": {
389-
"name": "type",
390-
"type": "DOMString"
391-
}
392-
}
393-
},
394-
"methods": {
395-
"method": {
396-
"matchMedium": {
397-
"name": "matchMedium",
398-
"overrideSignatures": [
399-
"matchMedium(mediaquery: string): boolean"
400-
]
401-
}
402-
}
403-
}
404-
},
405368
"Navigator": {
406369
"name": "Navigator",
407370
"properties": {

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,30 +3297,6 @@
32973297
}
32983298
}
32993299
},
3300-
"CSSFontFaceRule": {
3301-
"properties": {
3302-
"property": {
3303-
"style": {
3304-
// CSS Fonts Level 4 now says CSSFontFaceDescriptors but nobody implements it as of 2024-04
3305-
// https://github.com/w3c/csswg-drafts/pull/9686
3306-
"type": "CSSStyleProperties"
3307-
}
3308-
}
3309-
}
3310-
},
3311-
"CSSStyleProperties": {
3312-
"properties": {
3313-
"property": {
3314-
"cssFloat": {
3315-
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat"
3316-
},
3317-
"webkitLineClamp": {
3318-
// The corresponding standardized property is not supported by anyone as of 2024-10.
3319-
"deprecated": false
3320-
}
3321-
}
3322-
}
3323-
},
33243300
"ContactAddress": {
33253301
"name": "PaymentAddress"
33263302
},
@@ -3375,20 +3351,6 @@
33753351
"SourceBufferList": {
33763352
"exposed": "Window"
33773353
},
3378-
"StylePropertyMapReadOnly": {
3379-
"methods": {
3380-
"method": {
3381-
"get": {
3382-
// https://github.com/w3c/css-houdini-drafts/pull/1087
3383-
"signature": {
3384-
"0": {
3385-
"overrideType": "undefined | CSSStyleValue"
3386-
}
3387-
}
3388-
}
3389-
}
3390-
}
3391-
},
33923354
"HTMLImageElement": {
33933355
"properties": {
33943356
"property": {

inputfiles/patches/css-font.kdl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ enum FontDisplay {
66
fallback
77
optional
88
}
9+
10+
interface CSSFontFaceRule {
11+
property style type=CSSStyleProperties
12+
}
13+

inputfiles/patches/cssom.kdl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,21 @@ interface CSSStyleDeclaration \
66
forward=CSSStyleDeclarationBase \
77
forwardExtends=CSSStyleProperties
88

9-
interface CSSStyleProperties replaceReference=CSSStyleDeclaration
9+
interface CSSStyleProperties replaceReference=CSSStyleDeclaration {
10+
property imageOrientation deprecated=#true
11+
property wordWrap deprecated=#true
12+
property cssFloat mdnUrl="https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat"
13+
14+
// The corresponding standardized property is not supported by anyone as of 2024-10.
15+
property webkitLineClamp deprecated=#false
16+
}
17+
18+
// This is used in the React d.ts files, and not including
19+
// it would force an update for anyone using React.
20+
interface StyleMedia exposed=Window noInterfaceObject=#true deprecated="Do not use" {
21+
property type type=DOMString
22+
23+
method matchMedium returns=boolean {
24+
param mediaquery type=DOMString
25+
}
26+
}

src/build/patches.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ function handleProperty(child: Node): Partial<Property> {
221221
...optionalMember("optional", "boolean", child.properties?.optional),
222222
...optionalMember("overrideType", "string", child.properties?.overrideType),
223223
...optionalMember("type", "string", child.properties?.type),
224+
...optionalMember("deprecated", "boolean", child.properties?.deprecated),
225+
...optionalMember("mdnUrl", "string", child.properties?.mdnUrl),
224226
};
225227
}
226228

0 commit comments

Comments
 (0)