Class
StyleBase
NotCreatable
The base class for StyleSheet and StyleRule.
The base class for StyleSheet and StyleRule. Holds a list of
child StyleRules, as well as token definitions which are
stored as attributes.
Methods 3#
| GetStyleRules | Returns an array of associated StyleRules. |
| InsertStyleRule | Inserts a new StyleRule into the array of rules. |
| SetStyleRules | Similar to InsertStyleRule() but lets
you declare and set multiple StyleRules at once. |
GetStyleRules(): List<StyleRule>#
Returns an array of associated StyleRules.
Returns
List<StyleRule>— Array ofStyleRules.
InsertStyleRule(rule: StyleRule, priority: int?): ()#
Inserts a new StyleRule into the array of rules so that its
Priority is greater than all previous
StyleRules. If priority is specified, sets the new
rule's Priority to the specified value.
| Name | Type | Default | Description |
|---|---|---|---|
rule | StyleRule | The StyleRule to insert. | |
priority | int? | The number to set the rule's Priority to. |
Returns
()
SetStyleRules(rules: Instances): ()#
Similar to InsertStyleRule() but lets
you declare and set multiple StyleRules at once.
| Name | Type | Default | Description |
|---|---|---|---|
rules | Instances | Array of StyleRules to set. |
Returns
()
Events 1#
| StyleRulesChanged | Fires when one or more StyleRules is explicitly changed
on the connected StyleSheet or StyleRule. |
StyleRulesChanged()#
Fires when one or more StyleRules is explicitly changed
on the connected StyleSheet or StyleRule, for example when
InsertStyleRule() is called.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild