PseudoSelector class final AST

A pseudo-class or pseudo-element selector.

The semantics of a specific pseudo selector depends on its name. Some selectors take arguments, including other selectors. Sass manually encodes logic for each pseudo selector that takes a selector as an argument, to ensure that extension and other selector operations work properly.

Inheritance

Constructors

PseudoSelector(String name, FileSpan span, {bool element = false, String? argument, SelectorList? selector})

Properties

argument String?
The non-selector argument passed to this selector.
final
hashCode int
The hash code for this object.
no setteroverride
isBogus bool
Whether this selector is not valid CSS.
no setterinherited
isClass bool
Whether this is a pseudo-class selector.
final
isElement bool
Whether this is a pseudo-element selector.
no setter
isSyntacticClass bool
Whether this is syntactically a pseudo-class selector.
final
isSyntacticElement bool
Whether this is syntactically a pseudo-element selector.
no setter
name String
The name of this selector.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selector SelectorList?
The selector argument passed to this selector.
final
span → FileSpan
The source span associated with the node.
finalinherited
specificity int
This selector's specificity.
latefinal

Methods

accept<T>(SelectorVisitor<T> visitor) → T
Calls the appropriate visit method on visitor.
override
assertNotBogus({String? name}) → void
Prints a warning if this is a bogus selector.
inherited
isSuperselector(SimpleSelector other) bool
Whether this is a superselector of other.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withSelector(SelectorList selector) PseudoSelector
Returns a new PseudoSelector based on this, but with the selector replaced with selector.

Operators

operator ==(Object other) bool
The equality operator.
override