- AttributePresenceSelector
- AttributeValueSelector
- ClassSelector
- Combinator
- CompoundSelector
- IdSelector
- ListSelector
- Selector
- SimpleSelector
- Specificity
- TagSelector
- UniversalSelector
Ƭ AttributePresenceSelector: Object
Attribute presence selector.
https://www.w3.org/TR/selectors/#attribute-selectors
parseley
considers attribute presence and value selectors to be unrelated entities
for simplicity of processing.
Name | Type |
---|---|
name |
string |
namespace |
string | null |
specificity |
Specificity |
type |
"attrPresence" |
Ƭ AttributeValueSelector: Object
Attribute value selector.
https://www.w3.org/TR/selectors/#attribute-selectors
parseley
considers attribute presence and value selectors to be unrelated entities
for simplicity of processing.
Name | Type |
---|---|
matcher |
"=" | "~=" | "|=" | "^=" | "$=" | "*=" |
modifier |
"i" | "s" | null |
name |
string |
namespace |
string | null |
specificity |
Specificity |
type |
"attrValue" |
value |
string |
Ƭ ClassSelector: Object
Class selector.
https://www.w3.org/TR/selectors/#class-html
Name | Type |
---|---|
name |
string |
specificity |
Specificity |
type |
"class" |
Ƭ Combinator: Object
Represents a selectors combinator with what's on the left side of it.
https://www.w3.org/TR/selectors/#combinators
Name | Type |
---|---|
combinator |
" " | "+" | ">" | "~" | "||" |
left |
CompoundSelector |
specificity |
Specificity |
type |
"combinator" |
Ƭ CompoundSelector: Object
Compound selector - a set of conditions describing a single element.
https://www.w3.org/TR/selectors/#compound
https://www.w3.org/TR/selectors/#complex
Important note: due to the way parseley
represents combinators,
every compound selector is also a complex selector with everything
connected from the left side.
Specificity value also includes any extra weight added by the left side.
If there is a combinator in the selector - it is guaranteed to be the last entry in the list of inner selectors.
Name | Type |
---|---|
list |
SimpleSelector [] |
specificity |
Specificity |
type |
"compound" |
Ƭ IdSelector: Object
Id selector.
https://www.w3.org/TR/selectors/#id-selectors
Name | Type |
---|---|
name |
string |
specificity |
Specificity |
type |
"id" |
Ƭ ListSelector: Object
Represents a comma-separated list of compound selectors.
https://www.w3.org/TR/selectors/#selector-list
As this kind of selector can combine different ways to match elements, a single specificity value doesn't make sense for it and therefore absent.
Name | Type |
---|---|
list |
CompoundSelector [] |
type |
"list" |
Ƭ Selector: ListSelector
| CompoundSelector
| SimpleSelector
Any kind of selector supported by parseley
.
Ƭ SimpleSelector: UniversalSelector
| TagSelector
| ClassSelector
| IdSelector
| AttributePresenceSelector
| AttributeValueSelector
| Combinator
Any thing representing a single condition on an element.
https://www.w3.org/TR/selectors/#simple
parseley
deviates from the spec here by adding Combinator
to the enumeration.
This is done for simplicity of processing.
Combinator effectively considered an extra condition on a specific element ("have this kind of element in relation").
Ƭ Specificity: [number
, number
, number
]
Specificity as defined by Selectors spec.
https://www.w3.org/TR/selectors/#specificity
Three levels: for id, class, tag (type).
Extra level(s) used in HTML styling don't fit the scope of this package and no space reserved for them.
Ƭ TagSelector: Object
Tag name (type) selector.
https://www.w3.org/TR/selectors/#type-selectors
parseley
considers tag name and universal selectors to be unrelated entities
for simplicity of processing.
Name | Type |
---|---|
name |
string |
namespace |
string | null |
specificity |
Specificity |
type |
"tag" |
Ƭ UniversalSelector: Object
The *
selector.
https://www.w3.org/TR/selectors/#the-universal-selector
parseley
considers tag name and universal selectors to be unrelated entities
for simplicity of processing.
Name | Type |
---|---|
namespace |
string | null |
specificity |
Specificity |
type |
"universal" |