Class · inherits Instance
StyleBase
The base class for StyleSheet and StyleRule.
About StyleBase
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
() → List<StyleRule>Returns an array of associatedStyleRules.InsertStyleRule
(rule: StyleRule, priority: int?) → ()Inserts a newStyleRuleinto the array of rules.Inserts a new
StyleRuleinto the array of rules so that itsPriorityis greater than all previousStyleRules. Ifpriorityis specified, sets the new rule'sPriorityto the specified value.SetStyleRules
(rules: Instances) → ()Similar toInsertStyleRule()but lets you declare and set multipleStyleRulesat once.
Events 1
StyleRulesChanged
StyleBase.StyleRulesChanged:Connect(function())Fires when one or moreStyleRulesis explicitly changed on the connectedStyleSheetorStyleRule.Fires when one or more
StyleRulesis explicitly changed on the connectedStyleSheetorStyleRule, for example whenInsertStyleRule()is called.
StyleBase also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.