API ReferenceSandbox.UI

StyleSelectorclass

A CSS selector like "Panel.button.red:hover .text"

objectStyleSelector
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.UI.StyleSelector

Constructors1

Showing 1 constructors

Methods4

Showing 4 methods

public void Finalize(Sandbox.UI.StyleBlock block)PUBLIC

ParameterTypeDescription
blockStyleBlock
Returns:void

public bool Test(Sandbox.UI.IStyleTarget target, Sandbox.UI.PseudoClass forceFlag = 0)PUBLIC

Test whether target passes our selector test. We use forceFlag to do alternate tests for flags like ::before and ::after. It's basically added to the target's pseudo class list for the test.

ParameterTypeDescription
targetIStyleTarget
forceFlag = 0PseudoClass
Returns:bool

public bool TestParent(Sandbox.UI.IStyleTarget target, bool recusive = True)PUBLIC

ParameterTypeDescription
targetIStyleTarget
recusive = Truebool
Returns:bool

Properties3

Showing 3 properties

public string[] Sandbox.UI.StyleSelector.Classes { get; set; }PUBLICGETSET

Returns:string[]

public string Sandbox.UI.StyleSelector.Id { get; set; }PUBLICGETSET

The Id selector - minus the # https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors

Returns:string

public int Sandbox.UI.StyleSelector.Score { get; set; }PUBLICGETSET

Returns:int

On this page