CssParserAtRule Class

An at-rule (https://wicg.github.io/css-parser-api/#cssparseratrule, https://drafts.csswg.org/css-syntax-3/#at-rule): its name, its prelude and its block, or no block for a statement (e.g. @import url(a.css);).

public sealed class CssParserAtRule : CssParserRule
Inheritance
CssParserRule CssParserAtRule

Constructors

NameDescription
CssParserAtRule(string, IEnumerable<CssParserToken>, IEnumerable<CssParserRule>?)Creates an at-rule (https://wicg.github.io/css-parser-api/#dom-cssparseratrule-cssparseratrule).

CssParserAtRule(string, IEnumerable<CssParserToken>, IEnumerable<CssParserRule>?)

CssParserObjects.cs

Creates an at-rule (https://wicg.github.io/css-parser-api/#dom-cssparseratrule-cssparseratrule).

public CssParserAtRule(string name, IEnumerable<CssParserToken> prelude, IEnumerable<CssParserRule>? body = null)

Parameters

name string
The name, without @.
prelude IEnumerable<CssParserToken>
The component values between the name and the block.
body IEnumerable<CssParserRule>?
The rules and declarations of the block, or null for a statement.

See also

Properties

NameDescription
BodyGets the rules and declarations of the block, or null when the at-rule has no block.
NameGets the name of the at-rule, without @.
PreludeGets the component values between the name and the block (or the semicolon), whitespace included.

Gets the rules and declarations of the block, or null when the at-rule has no block.

public IReadOnlyList<CssParserRule>? Body { get; }

Gets the name of the at-rule, without @.

public string Name { get; }

Gets the component values between the name and the block (or the semicolon), whitespace included.

public IReadOnlyList<CssParserToken> Prelude { get; }