CssFunctionalPseudoSelectorSyntax Class

Represents a pseudo-class or a pseudo-element with arguments, such as :is(a, b), :nth-child(2n+1), or ::part(label).

public sealed class CssFunctionalPseudoSelectorSyntax : CssSimpleSelectorSyntax

Remarks

What CssFunctionalPseudoSelectorSyntax.Argument holds depends on the name: a CssSelectorListSyntax for :is(), :where(), :not(), and :has(), a CssNthArgumentSyntax for :nth-child() and the like, a CssCompoundSelectorSyntax for :host() and ::slotted(), a CssNameListSyntax for the ones that take names, and a CssGenericPreludeSyntax for the ones this parser does not know.

Inheritance
CssSimpleSelectorSyntax CssFunctionalPseudoSelectorSyntax

Properties

NameDescription
Argument
CloseParenToken
ColonToken
FunctionToken
IsPseudoElementDetermines whether this is a pseudo-element, written with two colons.
NameGets the name, without the colons and the parenthesis and with its escapes resolved, such as nth-child.
SecondColonToken
SelectorsGets the selector list of :is(), :where(), :not(), :has(), and the like, or null.

Argument

Syntax.g.cs
public CssSyntaxNode? Argument { get; }

Property value

CssSyntaxNode?

No documentation is available.

CloseParenToken

Syntax.g.cs
public SyntaxToken CloseParenToken { get; }

Property value

SyntaxToken

No documentation is available.

ColonToken

Syntax.g.cs
public SyntaxToken ColonToken { get; }

Property value

SyntaxToken

No documentation is available.

FunctionToken

Syntax.g.cs
public SyntaxToken FunctionToken { get; }

Property value

SyntaxToken

No documentation is available.

Determines whether this is a pseudo-element, written with two colons.

public bool IsPseudoElement { get; }

Property value

bool

Gets the name, without the colons and the parenthesis and with its escapes resolved, such as nth-child.

public string Name { get; }

Property value

string

SecondColonToken

Syntax.g.cs
public SyntaxToken SecondColonToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the selector list of :is(), :where(), :not(), :has(), and the like, or null.

public CssSelectorListSyntax? Selectors { get; }

Methods

NameDescription
Accept(CssSyntaxVisitor)
Accept<TResult>(CssSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken, CssSyntaxNode?, SyntaxToken)Returns this node with the given parts, or itself when nothing changed.
WithArgument(CssSyntaxNode?)Returns this node with argument in place of its CssFunctionalPseudoSelectorSyntax.Argument.
WithCloseParenToken(SyntaxToken)Returns this node with closeParenToken in place of its CssFunctionalPseudoSelectorSyntax.CloseParenToken.
WithColonToken(SyntaxToken)Returns this node with colonToken in place of its CssFunctionalPseudoSelectorSyntax.ColonToken.
WithFunctionToken(SyntaxToken)Returns this node with functionToken in place of its CssFunctionalPseudoSelectorSyntax.FunctionToken.
WithSecondColonToken(SyntaxToken)Returns this node with secondColonToken in place of its CssFunctionalPseudoSelectorSyntax.SecondColonToken.

Accept overloads

Accept(CssSyntaxVisitor)

Syntax.g.cs
public override void Accept(CssSyntaxVisitor visitor)
Parameters
visitor CssSyntaxVisitor

No documentation is available.

Accept<TResult>(CssSyntaxVisitor<TResult>)

Syntax.g.cs
public override TResult? Accept<TResult>(CssSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor CssSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxToken, SyntaxToken, SyntaxToken, CssSyntaxNode?, SyntaxToken)

Syntax.g.cs

Returns this node with the given parts, or itself when nothing changed.

public CssFunctionalPseudoSelectorSyntax Update(SyntaxToken colonToken, SyntaxToken secondColonToken, SyntaxToken functionToken, CssSyntaxNode? argument, SyntaxToken closeParenToken)

Parameters

colonToken SyntaxToken
secondColonToken SyntaxToken
functionToken SyntaxToken
argument CssSyntaxNode?
closeParenToken SyntaxToken

Returns

CssFunctionalPseudoSelectorSyntax

WithArgument(CssSyntaxNode?)

Syntax.g.cs

Returns this node with argument in place of its CssFunctionalPseudoSelectorSyntax.Argument.

public CssFunctionalPseudoSelectorSyntax WithArgument(CssSyntaxNode? argument)

WithCloseParenToken(SyntaxToken)

Syntax.g.cs

Returns this node with closeParenToken in place of its CssFunctionalPseudoSelectorSyntax.CloseParenToken.

public CssFunctionalPseudoSelectorSyntax WithCloseParenToken(SyntaxToken closeParenToken)

Parameters

closeParenToken SyntaxToken

Returns

CssFunctionalPseudoSelectorSyntax

WithColonToken(SyntaxToken)

Syntax.g.cs

Returns this node with colonToken in place of its CssFunctionalPseudoSelectorSyntax.ColonToken.

public CssFunctionalPseudoSelectorSyntax WithColonToken(SyntaxToken colonToken)

WithFunctionToken(SyntaxToken)

Syntax.g.cs

Returns this node with functionToken in place of its CssFunctionalPseudoSelectorSyntax.FunctionToken.

public CssFunctionalPseudoSelectorSyntax WithFunctionToken(SyntaxToken functionToken)

Parameters

functionToken SyntaxToken

Returns

CssFunctionalPseudoSelectorSyntax

WithSecondColonToken(SyntaxToken)

Syntax.g.cs

Returns this node with secondColonToken in place of its CssFunctionalPseudoSelectorSyntax.SecondColonToken.

public CssFunctionalPseudoSelectorSyntax WithSecondColonToken(SyntaxToken secondColonToken)

Parameters

secondColonToken SyntaxToken

Returns

CssFunctionalPseudoSelectorSyntax