Api Sandbox UI StyleBlock
class

StyleBlock

public sealed class StyleBlock

A CSS rule - ie ".chin { width: 100%; height: 100%; }"

Constructors

StyleBlock()

Properties

Name Type Description
Selectors StyleSelector[] A list of appropriate selectors for this block (ie ".button")
SelectorStrings virtual IEnumerable<String> A list of selectors for this block
FileName virtual String The filename of the file containing this style block (or null if none)
AbsolutePath virtual String The absolute on disk filename for this style block (or null if not on disk)
FileLine virtual Int32 The line in the file containing this style block

Methods

virtual List<StyleProperty> GetRawValues()

Get the list of raw style values

virtual Boolean SetRawValue(String key, String value, String originalValue = null)

Update a raw style value

StyleSelector Test(IStyleTarget target, PseudoClass forceFlag = 0)

Test whether target passes our selector tests. 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 TestBroadphase(IStyleTarget target)

Tests a few broadphase conditions to build a list of feasible styleblocks tailored for a panel.

Boolean SetSelector(String selector, StyleBlock parent = null)

Fields

Name Type Description
Styles Styles The styles that are defined in this block
Assembly: Sandbox.Engine Namespace: Sandbox.UI Full Name: Sandbox.UI.StyleBlock