PseudoElementSelector Class

A pseudo-element (https://drafts.csswg.org/selectors-4/#pseudo-elements). Pseudo-elements are not elements, so a selector containing one never matches an element.

public sealed class PseudoElementSelector : SimpleSelector
Inheritance
SimpleSelector PseudoElementSelector

Properties

NameDescription
ArgumentThe compound selector argument of ::slotted().
ArgumentTextThe serialized arguments of the functional pseudo-elements other than ::slotted() (e.g. the identifiers of ::part()).
IsFunctionWhether the pseudo-element is a function (e.g. ::part()).
NameThe name, in ASCII lowercase and without the colons (e.g. "before" or "part").
PartNamesThe part names of ::part() (https://drafts.csswg.org/css-shadow-1/#part).
SpecificityThe specificity of a pseudo-element, except ::highlight(*) whose specificity is zero (https://drafts.csswg.org/css-pseudo-4/#selectordef-highlight).

Argument

Selector.cs

The compound selector argument of ::slotted().

public SelectorList? Argument { get; }

Property value

SelectorList?

ArgumentText

Selector.cs

The serialized arguments of the functional pseudo-elements other than ::slotted() (e.g. the identifiers of ::part()).

public string? ArgumentText { get; }

Property value

string?

IsFunction

Selector.cs

Whether the pseudo-element is a function (e.g. ::part()).

public bool IsFunction { get; }

Property value

bool

The name, in ASCII lowercase and without the colons (e.g. "before" or "part").

public string Name { get; }

Property value

string

PartNames

Selector.cs

The part names of ::part() (https://drafts.csswg.org/css-shadow-1/#part).

public ImmutableArray<string> PartNames { get; }

Specificity

Selector.cs

The specificity of a pseudo-element, except ::highlight(*) whose specificity is zero (https://drafts.csswg.org/css-pseudo-4/#selectordef-highlight).

public override Specificity Specificity { get; }

Property value

Specificity