Struct Selector
CSS element selector
struct Selector
Fields
Type | Name | Description |
---|---|---|
attributes
|
List of attributes, [attr] variations from CSS
|
|
string[] |
classes
|
List of style classes, from CSS
|
combinator
|
Combinator in complex selectors | |
enabledState
|
State that is enabled, e.g. pressed|focused in :pressed:focused:not(checked)
|
|
string |
id
|
ID, #id from CSS
|
position
|
Tree-Structural pseudo-class, e.g. :root or :first-child
|
|
previous
|
Points to previous selector in the complex | |
uint[4] |
specificity
|
Selector specificity. |
specifiedState
|
State that is specified as :pseudo-class
|
|
string |
subitem
|
Subitem, ::pseudo-element from CSS
|
string |
type
|
Name of a widget or custom name |
bool |
universal
|
True if this is a universal selector without id, state, etc. |
Methods
Name | Description |
---|---|
calculateSpecificity
()
|
Calculate specificity of this selector |
calculateUniversality
()
|
Compute universal property
|
validateAttrs
()
|
Check if attribute selectors can match something |
Inner structs
Name | Description |
---|---|
Attr
|
Attribute matcher |
Enums
Name | Description |
---|---|
Combinator
|
Combinator in complex selectors |
TreePosition
|
Tree-Structural pseudo-class, e.g. :root or :first-child
|