Interface IStyleFormatter
- Namespace
- AngleSharp
- Assembly
- AngleSharp.dll
Basic interface for CSS node serialization.
public interface IStyleFormatter
- Extension Methods
Methods
BlockDeclarations(IEnumerable<IStyleFormattable>)
Creates the serialization of the declarations with the provided string representations.
string BlockDeclarations(IEnumerable<IStyleFormattable> declarations)
Parameters
declarations
IEnumerable<IStyleFormattable>The declarations to aggregate.
Returns
- string
The serialization of the declarations.
BlockRules(IEnumerable<IStyleFormattable>)
Concats the given rules to create a block serialization.
string BlockRules(IEnumerable<IStyleFormattable> rules)
Parameters
rules
IEnumerable<IStyleFormattable>The rules to aggregate.
Returns
- string
The serialization of the CSS rule block.
Comment(string)
Creates a serialization of a comment with the provided data.
string Comment(string data)
Parameters
data
stringThe data of the comment.
Returns
- string
The serialization of the comment.
Declaration(string, string, bool)
Creates the serialization of a declaration with the given name, value and important flag.
string Declaration(string name, string value, bool important)
Parameters
name
stringThe name of the declaration.
value
stringThe value of the declaration.
important
boolThe value of the important flag.
Returns
- string
The serialization of the declaration.
Rule(string, string)
Converts the name and value of the provided rule to a simple rule.
string Rule(string name, string value)
Parameters
Returns
- string
The serialization of the simple rule.
Rule(string, string, string)
Converts the name, prelude and rules of the provided rule to a composed rule.
string Rule(string name, string prelude, string rules)
Parameters
name
stringThe name of the nested rule.
prelude
stringThe optional prelude.
rules
stringThe serialization of the nested rules.
Returns
- string
The serialization of the nested rule.
Sheet(IEnumerable<IStyleFormattable>)
Concats the given rules to create the stylesheet serialization.
string Sheet(IEnumerable<IStyleFormattable> rules)
Parameters
rules
IEnumerable<IStyleFormattable>The rules to aggregate.
Returns
- string
The serialization of the sheet.