Interface CSSRuleManager
interface CSSRuleManager {
get cssText(): string;
get name(): string;
get selector(): string;
get(): { [key: string]: string };
getProperty(key: string): string;
isConnected(): boolean;
removeProperties(keys: Iterable<string>): void;
removeProperty(key: string): string;
setProperties(rules: { [key: string]: string }, overwrite?: boolean): void;
setProperty(key: string, value: string, overwrite?: boolean): void;
}
get cssText(): string;
get name(): string;
get selector(): string;
get(): { [key: string]: string };
getProperty(key: string): string;
isConnected(): boolean;
removeProperties(keys: Iterable<string>): void;
removeProperty(key: string): string;
setProperties(rules: { [key: string]: string }, overwrite?: boolean): void;
setProperty(key: string, value: string, overwrite?: boolean): void;
}
Index
Accessors
Methods
Accessors
cssText
- get cssText(): string
Returns string
Provides an accessor to get the
cssText
for the style sheet.
name
- get name(): string
Returns string
Name of this CSSRuleManager indexed by associated TJSStyleManager.
selector
- get selector(): string
Returns string
The associated selector for this CSS rule.
Methods
get
getProperty
isConnected
removeProperties
removeProperty
setProperties
- setProperties(rules: { [key: string]: string }, overwrite?: boolean): void
Set rules by property / value; useful for CSS variables.
Parameters
- rules: { [key: string]: string }
An object with property / value string pairs to load.
Optional
overwrite: booleanWhen true overwrites any existing values.
Returns void
- rules: { [key: string]: string }
Retrieves an object with the current CSS rule data.