Interface CSSRuleManager
interface CSSRuleManager {
get cssText(): string;
set cssText(cssText: string): void;
get isConnected(): boolean;
get name(): string;
get selector(): string;
get(): { [key: string]: string };
getProperty(key: string): string;
hasProperty(key: string): 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;
set cssText(cssText: string): void;
get isConnected(): boolean;
get name(): string;
get selector(): string;
get(): { [key: string]: string };
getProperty(key: string): string;
hasProperty(key: string): 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
cssText
- get cssText(): string
Returns string
Provides an accessor to get the
cssText
for the style sheet.- set cssText(cssText: string): void
Parameters
- cssText: string
Returns void
isConnected
- get isConnected(): boolean
Determines if this CSSRuleManager is still connected / available.
Returns boolean
Is CSSRuleManager connected.
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
hasProperty
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 }
Provides an accessor to set the
cssText
for the style rule.