CssParseOptions Class

Configures how CssSyntaxTree parses text.

public sealed class CssParseOptions : IEquatable<CssParseOptions>
Implements

Constructors

NameDescription
CssParseOptions()

CssParseOptions()

CssParseOptions.cs
public CssParseOptions()

No documentation is available.

Properties

NameDescription
DefaultGets the options used when none are given: a style sheet, with the default depth.
MaxDepthGets how deeply blocks, functions, selectors, and conditions may nest before the parser reports CSS0016 and keeps the rest as skipped text. Guards against a stack overflow on deeply nested input.
SourceKindGets what the text holds.

Gets the options used when none are given: a style sheet, with the default depth.

public static CssParseOptions Default { get; }

Property value

CssParseOptions

Gets how deeply blocks, functions, selectors, and conditions may nest before the parser reports CSS0016 and keeps the rest as skipped text. Guards against a stack overflow on deeply nested input.

public int MaxDepth { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than one.

Remarks

Raising it is safe: nesting that would not fit on the stack of the thread doing the parsing is reported as CSS0016 as well, whatever the limit says.

Gets what the text holds.

public CssSourceKind SourceKind { get; init; }

Property value

CssSourceKind

Exceptions

ArgumentOutOfRangeException
The value is not one of the kinds of CssSourceKind.

Methods

NameDescription
Equals(CssParseOptions?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(CssParseOptions?)

public bool Equals(CssParseOptions? other)
Parameters
other CssParseOptions?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(CssParseOptions?, CssParseOptions?)
operator !=(CssParseOptions?, CssParseOptions?)

operator ==(CssParseOptions?, CssParseOptions?)

public static bool operator ==(CssParseOptions? left, CssParseOptions? right)

Parameters

left CssParseOptions?
right CssParseOptions?

Returns

bool

No documentation is available.

operator !=(CssParseOptions?, CssParseOptions?)

public static bool operator !=(CssParseOptions? left, CssParseOptions? right)

Parameters

left CssParseOptions?
right CssParseOptions?

Returns

bool

No documentation is available.

Constants

NameDescription
DefaultMaxDepthThe default value of CssParseOptions.MaxDepth.

DefaultMaxDepth

The default value of CssParseOptions.MaxDepth.

public const int DefaultMaxDepth = 128