API ReferenceSandbox.UI
StyleSheetCollectionclass
A collection of `Sandbox.UI.StyleSheet` objects applied directly to a panel. See `Sandbox.UI.Panel.StyleSheet`.
object→StyleSheetCollection
Methods6
Showing 6 methods
public void Add(Sandbox.UI.StyleSheet sheet)
Add a stylesheet directly
| Parameter | Type | Description |
|---|---|---|
| sheet | StyleSheet | — |
Returns:
void—public System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<string,string>> CollectVariables()
Returns all CSS variables from the owning panel and its ancestors.
Returns:
IEnumerable<ValueTuple<string,string>>—public void Load(string filename, bool inheritVariables = True, bool failSilently = False)
Load the stylesheet from a file.
| Parameter | Type | Description |
|---|---|---|
| filename | string | — |
| inheritVariables = True | bool | — |
| failSilently = False | bool | — |
Returns:
void—public void Parse(string stylesheet, bool inheritVariables = True)
Load the stylesheet from a string.
| Parameter | Type | Description |
|---|---|---|
| stylesheet | string | — |
| inheritVariables = True | bool | — |
Returns:
void—No results match this filter.