Roblox UtilitiesDevlHub Roblox Documentation

Class

StyleBase

NotCreatable
Inherits
Instance › Object
Memory category
Gui
Subclasses
2

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#

GetStyleRulesReturns an array of associated StyleRules.
InsertStyleRuleInserts a new StyleRule into the array of rules.
SetStyleRulesSimilar to InsertStyleRule() but lets you declare and set multiple StyleRules at once.

GetStyleRules(): List<StyleRule>#

Returns an array of associated StyleRules.

Returns

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.

NameTypeDefaultDescription
ruleStyleRuleThe StyleRule to insert.
priorityint?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.

NameTypeDefaultDescription
rulesInstancesArray of StyleRules to set.
Returns
  • ()

Events 1#

StyleRulesChangedFires 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
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed

Subclasses 2#