CssPrettyFormatter Class

Writes an indented CSS text, to read or compare style sheets: each rule and each declaration is written on its own line, indented by its depth, and each selector of the selector list of a style rule is written on its own line.

public sealed class CssPrettyFormatter : CssFormatter

Remarks

An empty block is written on the line of its prelude (a {}).

Inheritance
CssFormatter CssPrettyFormatter

Constructors

NameDescription
CssPrettyFormatter()

CssPrettyFormatter()

CssPrettyFormatter.cs
public CssPrettyFormatter()

No documentation is available.

Properties

NameDescription
IndentationThe string written for each level of indentation. The default is two spaces.
MaxIndentationDepthThe maximum number of indentation levels: the content of the deeper blocks is indented as the content at this depth. The default is 64, which bounds the size of the output of deeply nested input (the indentation of each line would grow with the depth).
NewLineThe line separator. The default is "\n".

The string written for each level of indentation. The default is two spaces.

public string Indentation { get; init; }

Property value

string

MaxIndentationDepth

CssPrettyFormatter.cs

The maximum number of indentation levels: the content of the deeper blocks is indented as the content at this depth. The default is 64, which bounds the size of the output of deeply nested input (the indentation of each line would grow with the depth).

public int MaxIndentationDepth { get; init; }

Property value

int

The line separator. The default is "\n".

public string NewLine { get; init; }

Property value

string