StyleSheet
Registry of InlineStyle rules.
Diagram
Constructor
ts
new StyleSheet()Properties
This class exposes no public properties.
Methods
.set(name: string, style: InlineStyle)
| Argument | Type | Description |
|---|---|---|
name | string | Rule name or selector. |
style | InlineStyle | Inline style instance. |
Adds or updates a rule in the stylesheet. Returns this.
.get(name: string)
Returns the InlineStyle for the given name, or undefined.
| Argument | Type | Description |
|---|---|---|
name | string | Rule name or selector. |
.remove(name: string)
Removes a rule by name. Returns this.
| Argument | Type | Description |
|---|---|---|
name | string | Rule name or selector. |
.generate()
Generates CSS text for the entire stylesheet.
.toString()
Exports the stylesheet as a string.
Example
Recommended to test it in your browser. The test here might not work properly
Console
No logs yet.
