AttributeSelector Class

An attribute selector (https://drafts.csswg.org/selectors-4/#attribute-selectors).

public sealed class AttributeSelector : SimpleSelector
Inheritance
SimpleSelector AttributeSelector

Properties

NameDescription
CaseSensitivityGets how the attribute value is compared.
NameGets the name of the attribute to match.
NamespaceGets the namespace constraint of the attribute.
OperatorGets the operator used to compare the attribute value.
PrefixThe namespace prefix as written ("*" for any namespace, "" for no namespace), or null when there is no prefix.
SpecificityGets the specificity of the selector, always (0, 1, 0).
ValueThe value, or the empty string for AttributeOperator.Exists.

CaseSensitivity

Selector.cs

Gets how the attribute value is compared.

public AttributeCaseSensitivity CaseSensitivity { get; }

Gets the name of the attribute to match.

public string Name { get; }

Property value

string

Namespace

Selector.cs

Gets the namespace constraint of the attribute.

public NamespaceConstraint Namespace { get; }

Property value

NamespaceConstraint

Operator

Selector.cs

Gets the operator used to compare the attribute value.

public AttributeOperator Operator { get; }

Property value

AttributeOperator

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, always (0, 1, 0).

public override Specificity Specificity { get; }

Property value

Specificity

The value, or the empty string for AttributeOperator.Exists.

public string Value { get; }

Property value

string