API Reference
HtmlComputedStyleEngine
Lightweight computed-style helper for OfficeIMO conversion diagnostics and contract tests.
Inheritance
- Object
- HtmlComputedStyleEngine
Methods
public static IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> Compute(String html, HtmlCssMediaContext mediaContext = Screen) #IReadOnlyDictionary<HtmlElement, HtmlComputedStyle>Parses bounded HTML and computes styles for matching elements.
Parameters
- html System.String
- mediaContext OfficeIMO.Html.HtmlCssMediaContext = Screen
public static IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> Compute(String html, HtmlComputedStyleOptions options) #IReadOnlyDictionary<HtmlElement, HtmlComputedStyle>Parses bounded HTML and computes styles with explicit inspection options.
Parameters
- html System.String
- options OfficeIMO.Html.HtmlComputedStyleOptions
public static IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> Compute(HtmlConversionDocument document, HtmlCssMediaContext mediaContext = Screen) #IReadOnlyDictionary<HtmlElement, HtmlComputedStyle>Computes styles from a retained conversion document without reparsing its HTML source.
Parameters
- document OfficeIMO.Html.HtmlConversionDocument
- mediaContext OfficeIMO.Html.HtmlCssMediaContext = Screen
public static IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> Compute(HtmlConversionDocument document, HtmlComputedStyleOptions options) #IReadOnlyDictionary<HtmlElement, HtmlComputedStyle>Computes styles from a retained conversion document with explicit inspection options.
Parameters
- document OfficeIMO.Html.HtmlConversionDocument
- options OfficeIMO.Html.HtmlComputedStyleOptions
public static IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> Compute(HtmlDocument document, HtmlCssMediaContext mediaContext = Screen) #IReadOnlyDictionary<HtmlElement, HtmlComputedStyle>Computes styles keyed by owned nodes from the supplied document snapshot.
Parameters
- document OfficeIMO.Html.Dom.HtmlDocument
- mediaContext OfficeIMO.Html.HtmlCssMediaContext = Screen
public static IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> Compute(HtmlDocument document, HtmlComputedStyleOptions options) #IReadOnlyDictionary<HtmlElement, HtmlComputedStyle>Computes styles keyed by owned nodes with explicit inspection options.
Parameters
- document OfficeIMO.Html.Dom.HtmlDocument
- options OfficeIMO.Html.HtmlComputedStyleOptions
public static Boolean IsApplicableMedia(String mediaText, HtmlCssMediaContext mediaContext) #BooleanEvaluates whether a CSS media query list applies to the requested OfficeIMO media context.
Parameters
- mediaText System.String
- mediaContext OfficeIMO.Html.HtmlCssMediaContext
public static Boolean IsApplicableMedia(String mediaText, HtmlCssMediaContext mediaContext, Double surfaceWidth, Double surfaceHeight) #BooleanEvaluates whether a CSS media query list applies to a media context and surface size.
Parameters
- mediaText System.String
- mediaContext OfficeIMO.Html.HtmlCssMediaContext
- surfaceWidth System.Double
- surfaceHeight System.Double
public static Boolean IsApplicableMedia(String mediaText, HtmlCssMediaContext mediaContext, Double surfaceWidth, Double surfaceHeight, HtmlRenderMediaFeatures mediaFeatures) #BooleanEvaluates whether a CSS media query list applies to a media context, surface size, and deterministic static device environment.
Parameters
- mediaText System.String
- mediaContext OfficeIMO.Html.HtmlCssMediaContext
- surfaceWidth System.Double
- surfaceHeight System.Double
- mediaFeatures OfficeIMO.Html.HtmlRenderMediaFeatures
public static Boolean IsApplicableSupports(String conditionText) #BooleanEvaluates whether a CSS supports condition is active for the OfficeIMO CSS subset.
Parameters
- conditionText System.String
public static HtmlComputedStyleSummary Summarize(IReadOnlyDictionary<HtmlElement, HtmlComputedStyle> styles) #HtmlComputedStyleSummaryCreates a compact summary from computed style results.
Parameters
- styles System.Collections.Generic.IReadOnlyDictionary<OfficeIMO.Html.Dom.HtmlElement, OfficeIMO.Html.HtmlComputedStyle>
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?