Engine Class
StyleBase
Summary
Methods
InsertStyleRule(rule: StyleRule,priority: number?):() |
SetStyleRules(rules: Instances):() |
Events
Inherited by
API Reference
Methods
InsertStyleRule
SetStyleRules
StyleBase:SetStyleRules(rules:Instances):()
Parameters
rules:Instances |
Returns
()
Code Samples
Set Style Rules
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local coreSheet = Instance.new("StyleSheet")
coreSheet.Name = "CoreSheet"
coreSheet.Parent = ReplicatedStorage
local styleRuleA = Instance.new("StyleRule")
styleRuleA.Selector = "Frame"
styleRuleA:SetProperty("BackgroundColor3", Color3.new(1, 0, 0))
local styleRuleB = Instance.new("StyleRule")
styleRuleB.Selector = "Frame"
styleRuleB:SetProperty("BackgroundColor3", Color3.new(0, 1, 0))
coreSheet:SetStyleRules({ styleRuleA, styleRuleB })Events