# Sandbox.UI.StyleSelector

A CSS selector like "Panel.button.red:hover .text"

- Kind: class
- Namespace: `Sandbox.UI`
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Constructors

- [`StyleSelector`](/api/Sandbox.UI.StyleSelector/.ctor)

## Fields

- [`AdjacentSibling`](/api/Sandbox.UI.StyleSelector/AdjacentSibling): For + combinator
- [`AnyOf`](/api/Sandbox.UI.StyleSelector/AnyOf)
- [`AsString`](/api/Sandbox.UI.StyleSelector/AsString)
- [`Block`](/api/Sandbox.UI.StyleSelector/Block)
- [`DecendantOf`](/api/Sandbox.UI.StyleSelector/DecendantOf)
- [`Element`](/api/Sandbox.UI.StyleSelector/Element)
- [`Flags`](/api/Sandbox.UI.StyleSelector/Flags)
- [`GeneralSibling`](/api/Sandbox.UI.StyleSelector/GeneralSibling): For ~ combinator
- [`Has`](/api/Sandbox.UI.StyleSelector/Has)
- [`ImmediateParent`](/api/Sandbox.UI.StyleSelector/ImmediateParent)
- [`Not`](/api/Sandbox.UI.StyleSelector/Not)
- [`NthChild`](/api/Sandbox.UI.StyleSelector/NthChild)
- [`Parent`](/api/Sandbox.UI.StyleSelector/Parent): Descendant combinator A B Child combinator A > B Adjacent sibling combinator A + B General sibling combinator A ~B
- [`SelfScore`](/api/Sandbox.UI.StyleSelector/SelfScore)
- [`UniversalSelector`](/api/Sandbox.UI.StyleSelector/UniversalSelector): True if this has a universal selector (*)

## Properties

- [`Classes`](/api/Sandbox.UI.StyleSelector/Classes)
- [`Id`](/api/Sandbox.UI.StyleSelector/Id): The Id selector - minus the # https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors
- [`Score`](/api/Sandbox.UI.StyleSelector/Score)

## Methods

- [`Finalize`](/api/Sandbox.UI.StyleSelector/Finalize)
- [`Test`](/api/Sandbox.UI.StyleSelector/Test): 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.
- [`TestBroadphase`](/api/Sandbox.UI.StyleSelector/TestBroadphase)
- [`TestParent`](/api/Sandbox.UI.StyleSelector/TestParent)
