PseudoClassSelector Class

A pseudo-class (https://drafts.csswg.org/selectors-4/#pseudo-classes).

public sealed class PseudoClassSelector : SimpleSelector
Inheritance
SimpleSelector PseudoClassSelector

Properties

NameDescription
ArgumentThe selector argument of :is(), :where(), :not(), :has(), :nth-child(An+B of S), :nth-last-child(An+B of S), :host() and :host-context().
ArgumentTextThe serialized arguments of :lang().
KindGets the kind of the pseudo-class.
LevelsThe levels of :heading().
NameThe name as written, in ASCII lowercase and without the colon (e.g. "nth-child" or "-webkit-autofill").
NthThe An+B argument of :nth-child(), :nth-last-child(), :nth-of-type() and :nth-last-of-type().
SpecificityGets the specificity of the selector, which depends on the pseudo-class and its selector argument.
StringsThe language ranges of :lang(), the direction of :dir(), the identifier of :state(), the types of :active-view-transition-type().

Argument

Selector.cs

The selector argument of :is(), :where(), :not(), :has(), :nth-child(An+B of S), :nth-last-child(An+B of S), :host() and :host-context().

public SelectorList? Argument { get; }

Property value

SelectorList?

ArgumentText

Selector.cs

The serialized arguments of :lang().

public string? ArgumentText { get; }

Property value

string?

Gets the kind of the pseudo-class.

public PseudoClass Kind { get; }

Property value

PseudoClass

The levels of :heading().

public ImmutableArray<int> Levels { get; }

Property value

ImmutableArray<int>

The name as written, in ASCII lowercase and without the colon (e.g. "nth-child" or "-webkit-autofill").

public string Name { get; }

Property value

string

The An+B argument of :nth-child(), :nth-last-child(), :nth-of-type() and :nth-last-of-type().

public AnB Nth { get; }

Property value

AnB

Specificity

Selector.cs

Gets the specificity of the selector, which depends on the pseudo-class and its selector argument.

public override Specificity Specificity { get; }

Property value

Specificity

The language ranges of :lang(), the direction of :dir(), the identifier of :state(), the types of :active-view-transition-type().

public ImmutableArray<string> Strings { get; }