Skip to content

Commit 559c567

Browse files
authored
Use CSSStyleProperties to prepare for bcd 6.0.24 (#2052)
Corresponds to w3c/csswg-drafts#9686.
1 parent af0de20 commit 559c567

File tree

9 files changed

+216
-221
lines changed

9 files changed

+216
-221
lines changed

baselines/dom.generated.d.ts

Lines changed: 65 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4785,7 +4785,7 @@ interface CSSFontFaceRule extends CSSRule {
47854785
*
47864786
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule/style)
47874787
*/
4788-
get style(): CSSStyleDeclaration;
4788+
get style(): CSSStyleProperties;
47894789
set style(cssText: string);
47904790
}
47914791

@@ -4955,7 +4955,7 @@ interface CSSKeyframeRule extends CSSRule {
49554955
*
49564956
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframeRule/style)
49574957
*/
4958-
get style(): CSSStyleDeclaration;
4958+
get style(): CSSStyleProperties;
49594959
set style(cssText: string);
49604960
}
49614961

@@ -5290,7 +5290,7 @@ interface CSSNestedDeclarations extends CSSRule {
52905290
*
52915291
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations/style)
52925292
*/
5293-
get style(): CSSStyleDeclaration;
5293+
get style(): CSSStyleProperties;
52945294
set style(cssText: string);
52955295
}
52965296

@@ -5416,7 +5416,7 @@ interface CSSPageRule extends CSSGroupingRule {
54165416
*
54175417
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPageRule/style)
54185418
*/
5419-
get style(): CSSStyleDeclaration;
5419+
get style(): CSSStyleProperties;
54205420
set style(cssText: string);
54215421
}
54225422

@@ -5745,6 +5745,63 @@ declare var CSSStartingStyleRule: {
57455745
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration)
57465746
*/
57475747
interface CSSStyleDeclaration {
5748+
/**
5749+
* The **`cssText`** property of the CSSStyleDeclaration interface returns or sets the text of the element's **inline** style declaration only.
5750+
*
5751+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText)
5752+
*/
5753+
cssText: string;
5754+
/**
5755+
* The read-only property returns an integer that represents the number of style declarations in this CSS declaration block.
5756+
*
5757+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length)
5758+
*/
5759+
readonly length: number;
5760+
/**
5761+
* The **CSSStyleDeclaration.parentRule** read-only property returns a CSSRule that is the parent of this style block, e.g., a CSSStyleRule representing the style for a CSS selector.
5762+
*
5763+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule)
5764+
*/
5765+
readonly parentRule: CSSRule | null;
5766+
/**
5767+
* The **CSSStyleDeclaration.getPropertyPriority()** method interface returns a string that provides all explicitly set priorities on the CSS property.
5768+
*
5769+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority)
5770+
*/
5771+
getPropertyPriority(property: string): string;
5772+
/**
5773+
* The **CSSStyleDeclaration.getPropertyValue()** method interface returns a string containing the value of a specified CSS property.
5774+
*
5775+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue)
5776+
*/
5777+
getPropertyValue(property: string): string;
5778+
/**
5779+
* The `CSSStyleDeclaration.item()` method interface returns a CSS property name from a CSSStyleDeclaration by index.
5780+
*
5781+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item)
5782+
*/
5783+
item(index: number): string;
5784+
/**
5785+
* The **`CSSStyleDeclaration.removeProperty()`** method interface removes a property from a CSS style declaration object.
5786+
*
5787+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/removeProperty)
5788+
*/
5789+
removeProperty(property: string): string;
5790+
/**
5791+
* The **`CSSStyleDeclaration.setProperty()`** method interface sets a new value for a property on a CSS style declaration object.
5792+
*
5793+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty)
5794+
*/
5795+
setProperty(property: string, value: string | null, priority?: string): void;
5796+
[index: number]: string;
5797+
}
5798+
5799+
declare var CSSStyleDeclaration: {
5800+
prototype: CSSStyleDeclaration;
5801+
new(): CSSStyleDeclaration;
5802+
};
5803+
5804+
interface CSSStyleProperties extends CSSStyleDeclaration {
57485805
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/accent-color) */
57495806
accentColor: string;
57505807
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/align-content) */
@@ -6034,12 +6091,6 @@ interface CSSStyleDeclaration {
60346091
counterSet: string;
60356092
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) */
60366093
cssFloat: string;
6037-
/**
6038-
* The **`cssText`** property of the CSSStyleDeclaration interface returns or sets the text of the element's **inline** style declaration only.
6039-
*
6040-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText)
6041-
*/
6042-
cssText: string;
60436094
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */
60446095
cursor: string;
60456096
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cx) */
@@ -6217,12 +6268,6 @@ interface CSSStyleDeclaration {
62176268
justifySelf: string;
62186269
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/left) */
62196270
left: string;
6220-
/**
6221-
* The read-only property returns an integer that represents the number of style declarations in this CSS declaration block.
6222-
*
6223-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length)
6224-
*/
6225-
readonly length: number;
62266271
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) */
62276272
letterSpacing: string;
62286273
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/lighting-color) */
@@ -6413,12 +6458,6 @@ interface CSSStyleDeclaration {
64136458
pageBreakInside: string;
64146459
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/paint-order) */
64156460
paintOrder: string;
6416-
/**
6417-
* The **CSSStyleDeclaration.parentRule** read-only property returns a CSSRule that is the parent of this style block, e.g., a CSSStyleRule representing the style for a CSS selector.
6418-
*
6419-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule)
6420-
*/
6421-
readonly parentRule: CSSRule | null;
64226461
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/perspective) */
64236462
perspective: string;
64246463
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) */
@@ -7099,42 +7138,11 @@ interface CSSStyleDeclaration {
70997138
zIndex: string;
71007139
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/zoom) */
71017140
zoom: string;
7102-
/**
7103-
* The **CSSStyleDeclaration.getPropertyPriority()** method interface returns a string that provides all explicitly set priorities on the CSS property.
7104-
*
7105-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority)
7106-
*/
7107-
getPropertyPriority(property: string): string;
7108-
/**
7109-
* The **CSSStyleDeclaration.getPropertyValue()** method interface returns a string containing the value of a specified CSS property.
7110-
*
7111-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue)
7112-
*/
7113-
getPropertyValue(property: string): string;
7114-
/**
7115-
* The `CSSStyleDeclaration.item()` method interface returns a CSS property name from a CSSStyleDeclaration by index.
7116-
*
7117-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item)
7118-
*/
7119-
item(index: number): string;
7120-
/**
7121-
* The **`CSSStyleDeclaration.removeProperty()`** method interface removes a property from a CSS style declaration object.
7122-
*
7123-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/removeProperty)
7124-
*/
7125-
removeProperty(property: string): string;
7126-
/**
7127-
* The **`CSSStyleDeclaration.setProperty()`** method interface sets a new value for a property on a CSS style declaration object.
7128-
*
7129-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty)
7130-
*/
7131-
setProperty(property: string, value: string | null, priority?: string): void;
7132-
[index: number]: string;
71337141
}
71347142

7135-
declare var CSSStyleDeclaration: {
7136-
prototype: CSSStyleDeclaration;
7137-
new(): CSSStyleDeclaration;
7143+
declare var CSSStyleProperties: {
7144+
prototype: CSSStyleProperties;
7145+
new(): CSSStyleProperties;
71387146
};
71397147

71407148
/**
@@ -7154,7 +7162,7 @@ interface CSSStyleRule extends CSSGroupingRule {
71547162
*
71557163
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style)
71567164
*/
7157-
get style(): CSSStyleDeclaration;
7165+
get style(): CSSStyleProperties;
71587166
set style(cssText: string);
71597167
/**
71607168
* The **`styleMap`** read-only property of the which provides access to the rule's property-value pairs.

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

Lines changed: 65 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4785,7 +4785,7 @@ interface CSSFontFaceRule extends CSSRule {
47854785
*
47864786
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFaceRule/style)
47874787
*/
4788-
readonly style: CSSStyleDeclaration;
4788+
readonly style: CSSStyleProperties;
47894789
}
47904790

47914791
declare var CSSFontFaceRule: {
@@ -4953,7 +4953,7 @@ interface CSSKeyframeRule extends CSSRule {
49534953
*
49544954
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframeRule/style)
49554955
*/
4956-
readonly style: CSSStyleDeclaration;
4956+
readonly style: CSSStyleProperties;
49574957
}
49584958

49594959
declare var CSSKeyframeRule: {
@@ -5286,7 +5286,7 @@ interface CSSNestedDeclarations extends CSSRule {
52865286
*
52875287
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations/style)
52885288
*/
5289-
readonly style: CSSStyleDeclaration;
5289+
readonly style: CSSStyleProperties;
52905290
}
52915291

52925292
declare var CSSNestedDeclarations: {
@@ -5411,7 +5411,7 @@ interface CSSPageRule extends CSSGroupingRule {
54115411
*
54125412
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPageRule/style)
54135413
*/
5414-
readonly style: CSSStyleDeclaration;
5414+
readonly style: CSSStyleProperties;
54155415
}
54165416

54175417
declare var CSSPageRule: {
@@ -5739,6 +5739,63 @@ declare var CSSStartingStyleRule: {
57395739
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration)
57405740
*/
57415741
interface CSSStyleDeclaration {
5742+
/**
5743+
* The **`cssText`** property of the CSSStyleDeclaration interface returns or sets the text of the element's **inline** style declaration only.
5744+
*
5745+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText)
5746+
*/
5747+
cssText: string;
5748+
/**
5749+
* The read-only property returns an integer that represents the number of style declarations in this CSS declaration block.
5750+
*
5751+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length)
5752+
*/
5753+
readonly length: number;
5754+
/**
5755+
* The **CSSStyleDeclaration.parentRule** read-only property returns a CSSRule that is the parent of this style block, e.g., a CSSStyleRule representing the style for a CSS selector.
5756+
*
5757+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule)
5758+
*/
5759+
readonly parentRule: CSSRule | null;
5760+
/**
5761+
* The **CSSStyleDeclaration.getPropertyPriority()** method interface returns a string that provides all explicitly set priorities on the CSS property.
5762+
*
5763+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority)
5764+
*/
5765+
getPropertyPriority(property: string): string;
5766+
/**
5767+
* The **CSSStyleDeclaration.getPropertyValue()** method interface returns a string containing the value of a specified CSS property.
5768+
*
5769+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue)
5770+
*/
5771+
getPropertyValue(property: string): string;
5772+
/**
5773+
* The `CSSStyleDeclaration.item()` method interface returns a CSS property name from a CSSStyleDeclaration by index.
5774+
*
5775+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item)
5776+
*/
5777+
item(index: number): string;
5778+
/**
5779+
* The **`CSSStyleDeclaration.removeProperty()`** method interface removes a property from a CSS style declaration object.
5780+
*
5781+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/removeProperty)
5782+
*/
5783+
removeProperty(property: string): string;
5784+
/**
5785+
* The **`CSSStyleDeclaration.setProperty()`** method interface sets a new value for a property on a CSS style declaration object.
5786+
*
5787+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty)
5788+
*/
5789+
setProperty(property: string, value: string | null, priority?: string): void;
5790+
[index: number]: string;
5791+
}
5792+
5793+
declare var CSSStyleDeclaration: {
5794+
prototype: CSSStyleDeclaration;
5795+
new(): CSSStyleDeclaration;
5796+
};
5797+
5798+
interface CSSStyleProperties extends CSSStyleDeclaration {
57425799
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/accent-color) */
57435800
accentColor: string;
57445801
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/align-content) */
@@ -6028,12 +6085,6 @@ interface CSSStyleDeclaration {
60286085
counterSet: string;
60296086
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssFloat) */
60306087
cssFloat: string;
6031-
/**
6032-
* The **`cssText`** property of the CSSStyleDeclaration interface returns or sets the text of the element's **inline** style declaration only.
6033-
*
6034-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/cssText)
6035-
*/
6036-
cssText: string;
60376088
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */
60386089
cursor: string;
60396090
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cx) */
@@ -6211,12 +6262,6 @@ interface CSSStyleDeclaration {
62116262
justifySelf: string;
62126263
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/left) */
62136264
left: string;
6214-
/**
6215-
* The read-only property returns an integer that represents the number of style declarations in this CSS declaration block.
6216-
*
6217-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/length)
6218-
*/
6219-
readonly length: number;
62206265
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) */
62216266
letterSpacing: string;
62226267
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/lighting-color) */
@@ -6407,12 +6452,6 @@ interface CSSStyleDeclaration {
64076452
pageBreakInside: string;
64086453
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/paint-order) */
64096454
paintOrder: string;
6410-
/**
6411-
* The **CSSStyleDeclaration.parentRule** read-only property returns a CSSRule that is the parent of this style block, e.g., a CSSStyleRule representing the style for a CSS selector.
6412-
*
6413-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/parentRule)
6414-
*/
6415-
readonly parentRule: CSSRule | null;
64166455
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/perspective) */
64176456
perspective: string;
64186457
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/perspective-origin) */
@@ -7093,42 +7132,11 @@ interface CSSStyleDeclaration {
70937132
zIndex: string;
70947133
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/zoom) */
70957134
zoom: string;
7096-
/**
7097-
* The **CSSStyleDeclaration.getPropertyPriority()** method interface returns a string that provides all explicitly set priorities on the CSS property.
7098-
*
7099-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority)
7100-
*/
7101-
getPropertyPriority(property: string): string;
7102-
/**
7103-
* The **CSSStyleDeclaration.getPropertyValue()** method interface returns a string containing the value of a specified CSS property.
7104-
*
7105-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue)
7106-
*/
7107-
getPropertyValue(property: string): string;
7108-
/**
7109-
* The `CSSStyleDeclaration.item()` method interface returns a CSS property name from a CSSStyleDeclaration by index.
7110-
*
7111-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/item)
7112-
*/
7113-
item(index: number): string;
7114-
/**
7115-
* The **`CSSStyleDeclaration.removeProperty()`** method interface removes a property from a CSS style declaration object.
7116-
*
7117-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/removeProperty)
7118-
*/
7119-
removeProperty(property: string): string;
7120-
/**
7121-
* The **`CSSStyleDeclaration.setProperty()`** method interface sets a new value for a property on a CSS style declaration object.
7122-
*
7123-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/setProperty)
7124-
*/
7125-
setProperty(property: string, value: string | null, priority?: string): void;
7126-
[index: number]: string;
71277135
}
71287136

7129-
declare var CSSStyleDeclaration: {
7130-
prototype: CSSStyleDeclaration;
7131-
new(): CSSStyleDeclaration;
7137+
declare var CSSStyleProperties: {
7138+
prototype: CSSStyleProperties;
7139+
new(): CSSStyleProperties;
71327140
};
71337141

71347142
/**
@@ -7148,7 +7156,7 @@ interface CSSStyleRule extends CSSGroupingRule {
71487156
*
71497157
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style)
71507158
*/
7151-
readonly style: CSSStyleDeclaration;
7159+
readonly style: CSSStyleProperties;
71527160
/**
71537161
* The **`styleMap`** read-only property of the which provides access to the rule's property-value pairs.
71547162
*

0 commit comments

Comments
 (0)