Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

HtmlCssSyntaxParser

Namespace OfficeIMO.Html.Css
Assembly OfficeIMO.Html.Core
Modifiers static

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: HtmlCssStyleBlock

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 System.String requiredposition: 0
options OfficeIMO.Html.Css.HtmlCssSyntaxOptions = null optionalposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public static HtmlCssStyleSheet ParseStyleSheet(String source, HtmlCssSyntaxOptions options = null, CancellationToken cancellationToken = default) #
Returns: HtmlCssStyleSheet

Parses a stylesheet without validating selector or property grammars. Unknown at-rules, declarations, comments, whitespace, and recovered invalid source remain available.

Parameters

source System.String requiredposition: 0
options OfficeIMO.Html.Css.HtmlCssSyntaxOptions = null optionalposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2