NestingSelector Class

The nesting selector (https://drafts.csswg.org/css-nesting/#nest-selector): the elements matched by the parent style rule, or the scoping root (:scope) outside of a style rule.

public sealed class NestingSelector : SimpleSelector
Inheritance
SimpleSelector NestingSelector

Properties

NameDescription
ImplicitWhether the nesting selector is implied by a relative selector of a nested or scoped style rule, or of a <scope-end> (https://drafts.csswg.org/css-cascade-6/#scoped-rules): it is not serialized.
ParentThe selector of the parent style rule, or null outside of a style rule (bound when the style sheet is applied).
SpecificityGets the specificity of the selector, the greatest specificity of the parent selector list. A parent selector with a pseudo-element is contextually invalid in the :is() the nesting selector stands for: it never matches and has no specificity (https://drafts.csswg.org/css-nesting/#nest-selector).

Implicit

Selector.cs

Whether the nesting selector is implied by a relative selector of a nested or scoped style rule, or of a <scope-end> (https://drafts.csswg.org/css-cascade-6/#scoped-rules): it is not serialized.

public bool Implicit { get; }

Property value

bool

The selector of the parent style rule, or null outside of a style rule (bound when the style sheet is applied).

public SelectorList? Parent { get; }

Property value

SelectorList?

Specificity

Selector.cs

Gets the specificity of the selector, the greatest specificity of the parent selector list. A parent selector with a pseudo-element is contextually invalid in the :is() the nesting selector stands for: it never matches and has no specificity (https://drafts.csswg.org/css-nesting/#nest-selector).

public override Specificity Specificity { get; }

Property value

Specificity