Skip to content
Roblox API Reference

StyleQuery

Instance used to set conditions such as "MaxSize" and "PreferredInput" for a StyleRule.
Memory category
Instances
Own members
13
Inherited members
75
Subclasses
0
Siblings
608

Properties32

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byStyleQuery9

Property categoryBehavior

Property categoryConditions

  • StyleQuery.AspectRatioRange: NumberRange = 0 inf
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
  • StyleQuery.MaxSize: Vector2 = INF, INF
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
  • StyleQuery.MinSize: Vector2 = Vector2.zero
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
  • StyleQuery.ReducedMotionEnabled: boolean = false
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
  • StyleQuery.ViewportDisplaySize: Enum.DisplaySize = Enum.DisplaySize.Small
    • Not replicated
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI

Property categoryData

  • StyleQuery.ConditionsSerialize: string = ""
    • Hidden
    • Not scriptable
    • Roblox engine security
    • Read capabilities: UI

Methods46

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byStyleQuery4
  • StyleQuery:GetCondition(name: string): any
    Returns the value of a specific condition in the StyleQuery.
    • Capabilities: UI
    Parameters
    ParameterDescription
    name: string
    String name of the condition, for example "MaxSize" or "ViewportDisplaySize".
    Returns
    TypeDescription
    any
    Value of the condition.
  • StyleQuery:GetConditions(): { [string]: any }
    Returns a dictionary of key-value pairs describing the conditoins set on the StyleQuery.
    • Capabilities: UI
    Returns
    TypeDescription
    { [string]: any }
    Dictionary of key-value pairs describing the conditions set on the StyleQuery.
  • StyleQuery:SetCondition(name: string, value: any)
    • Capabilities: UI
    Parameters
    ParameterDescription
    name: string
    Condition name to set, for example "MinSize".
    value: any
    Condition value to set, for example Vector2.new(100, 0).
  • StyleQuery:SetConditions(conditions: { [string]: any })
    Lets you declare and set multiple conditions of the StyleQuery at once.
    • Capabilities: UI
    Parameters
    ParameterDescription
    conditions: { [string]: any }
    Dictionary of key-value pairs defining the conditions to set.

Events10

Inherited fromObject1
Inherited fromInstance9