Class
HtmlCssSyntaxParser
OfficeIMO.Html.Css
Parses provider-independent CSS rules, declarations, and nested component values while retaining exact source.
Inheritance
- object
- HtmlCssSyntaxParser
Methods
public static HtmlCssStyleBlock ParseStyleBlock(string source, HtmlCssSyntaxOptions? options = null, CancellationToken cancellationToken = default) #Parses the contents of a style block, such as a style attribute, preserving duplicate and unknown declarations together with nested rules and invalid recovered source.
Parameters
- source string
- options OfficeIMO.Html.Css.HtmlCssSyntaxOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
HtmlCssStyleBlockpublic static HtmlCssStyleSheet ParseStyleSheet(string source, HtmlCssSyntaxOptions? options = null, CancellationToken cancellationToken = default) #Parses a stylesheet without validating selector or property grammars. Unknown at-rules, declarations, comments, whitespace, and recovered invalid source remain available.
Parameters
- source string
- options OfficeIMO.Html.Css.HtmlCssSyntaxOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
HtmlCssStyleSheet