TypeSelector Class

A type selector or the universal selector (https://drafts.csswg.org/selectors-4/#type-selectors).

public sealed class TypeSelector : SimpleSelector
Inheritance
SimpleSelector TypeSelector

Properties

NameDescription
ImplicitWhether the universal selector is implied by a compound selector without type selector when a default namespace is declared (https://drafts.csswg.org/css-namespaces/#prefixes): it restricts the compound selector to the elements of the default namespace, and it is not serialized.
IsDefaultNamespaceWhether the namespace is the default namespace (the prefix is then not serialized).
IsUniversalWhether this is the universal selector (*, https://drafts.csswg.org/selectors-4/#the-universal-selector).
LocalNameThe local name, or null for the universal selector.
NamespaceGets the namespace constraint of the selector.
PrefixThe namespace prefix as written ("*" for any namespace, "" for no namespace), or null when there is no prefix.
SpecificityGets the specificity of the selector: (0, 0, 1) for a type selector, (0, 0, 0) for the universal selector.

Implicit

Selector.cs

Whether the universal selector is implied by a compound selector without type selector when a default namespace is declared (https://drafts.csswg.org/css-namespaces/#prefixes): it restricts the compound selector to the elements of the default namespace, and it is not serialized.

public bool Implicit { get; }

Property value

bool

IsDefaultNamespace

Selector.cs

Whether the namespace is the default namespace (the prefix is then not serialized).

public bool IsDefaultNamespace { get; }

Property value

bool

IsUniversal

Selector.cs

Whether this is the universal selector (*, https://drafts.csswg.org/selectors-4/#the-universal-selector).

public bool IsUniversal { get; }

Property value

bool

LocalName

Selector.cs

The local name, or null for the universal selector.

public string? LocalName { get; }

Property value

string?

Namespace

Selector.cs

Gets the namespace constraint of the selector.

public NamespaceConstraint Namespace { get; }

Property value

NamespaceConstraint

The namespace prefix as written ("*" for any namespace, "" for no namespace), or null when there is no prefix.

public string? Prefix { get; }

Property value

string?

Specificity

Selector.cs

Gets the specificity of the selector: (0, 0, 1) for a type selector, (0, 0, 0) for the universal selector.

public override Specificity Specificity { get; }

Property value

Specificity