API Reference
Class
HtmlCssSyntaxParser
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) #Returns:
HtmlCssStyleBlockParses 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 System.String
- options OfficeIMO.Html.Css.HtmlCssSyntaxOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static HtmlCssStyleSheet ParseStyleSheet(String source, HtmlCssSyntaxOptions options = null, CancellationToken cancellationToken = default) #Returns:
HtmlCssStyleSheetParses a stylesheet without validating selector or property grammars. Unknown at-rules, declarations, comments, whitespace, and recovered invalid source remain available.
Parameters
- source System.String
- options OfficeIMO.Html.Css.HtmlCssSyntaxOptions = null
- cancellationToken System.Threading.CancellationToken = default