Api Sandbox UI StyleSelector
class

StyleSelector

public sealed class StyleSelector

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

Constructors

StyleSelector()

Properties

Name Type Description
Classes String[]
Id String The Id selector - minus the # https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors
Score Int32

Methods

Void Finalize(StyleBlock block)
Boolean TestBroadphase(IStyleTarget target)
Boolean Test(IStyleTarget target, PseudoClass forceFlag = 0)

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.

Boolean TestParent(IStyleTarget target, Boolean recusive = True)

Fields

Name Type Description
Block StyleBlock
AsString String
Element String
Flags PseudoClass
Parent StyleSelector Descendant combinator A B Child combinator A > B Adjacent sibling combinator A + B General sibling combinator A ~B
Not StyleSelector
ImmediateParent Boolean
UniversalSelector Boolean True if this has a universal selector (*)
AdjacentSibling Boolean For + combinator
GeneralSibling Boolean For ~ combinator
AnyOf StyleSelector[]
DecendantOf StyleSelector[]
Has StyleSelector[]
SelfScore Int32
NthChild Func<IStyleTarget, Boolean>
Assembly: Sandbox.Engine Namespace: Sandbox.UI Full Name: Sandbox.UI.StyleSelector