Skip to content

Class · inherits Instance

StyleBase

Official docs ↗

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 associated StyleRules.
  • InsertStyleRule(rule: StyleRule, priority: int?) → ()Inserts a new StyleRule into the array of rules.

    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.

  • SetStyleRules(rules: Instances) → ()Similar to InsertStyleRule() but lets you declare and set multiple StyleRules at once.

Events 1

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.