A part of pure CSS selector.

It may represent a selector like element-name#id.class1.classN[attr1][attr2]:pseudo-class::pseudo-element with any of sub-parts omitted. Attributes, pseudo-classes, and pseudo-elements are represented as sub-selectors. A raw CSS selector can also be represented by this structure, but is never parsed.

All of the properties are optional.

This is the base of the structured CSS selector part. In contrast to the latter it does not support qualifiers.

Hierarchy

Properties

Properties

c?: QualifiedName | readonly QualifiedName[]

Element class name or names.

e?: QualifiedName

Element name.

This is the same as * when absent. Unless the part contains only sub-selectors, and the first one is either a pseudo-class or a pseudo-element.

i?: QualifiedName

Element identifier.

ns?: string | NamespaceDef

Element namespace.

s?: string

Raw CSS selector text to append to the end.

When all other properties are omitted this one represents a raw CSS selector text. Otherwise it is appended to other selector parts representation.

Sub-selector(s) representing either attribute selector, pseudo-class, or pseudo-element.

Generated using TypeDoc