CompoundSelector Class

A compound selector, with the pseudo-elements and the pseudo-classes that follow them (https://drafts.csswg.org/selectors-4/#compound).

public sealed class CompoundSelector

Properties

NameDescription
HasPseudoElementGets a value indicating whether the compound selector contains a pseudo-element.
SelectorsThe simple selectors, in source order.
SpecificityGets the specificity of the compound selector, the sum of the specificities of its simple selectors.

HasPseudoElement

Selector.cs

Gets a value indicating whether the compound selector contains a pseudo-element.

public bool HasPseudoElement { get; }

Property value

bool

Selectors

Selector.cs

The simple selectors, in source order.

public ImmutableArray<SimpleSelector> Selectors { get; }

Specificity

Selector.cs

Gets the specificity of the compound selector, the sum of the specificities of its simple selectors.

public Specificity Specificity { get; }

Property value

Specificity

Methods

NameDescription
ToString()Serializes the compound selector (https://drafts.csswg.org/cssom/#serialize-a-selector).

ToString()

Selector.cs

Serializes the compound selector (https://drafts.csswg.org/cssom/#serialize-a-selector).

public override string ToString()

Returns

string