Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

HtmlResponsiveImageSelector

OfficeIMO.Html

Namespace
OfficeIMO.Html
Assembly
OfficeIMO.Html
Source revision
3b680b1b6fb1 with working tree changes
Modifiers
static

Selects one candidate from an HTML srcset and sizes pair without depending on a DOM provider.

Inheritance

  • object
  • HtmlResponsiveImageSelector

Methods

public static HtmlResponsiveImageSelection Select(string? srcSet, string? sizes, string? defaultSource, HtmlResponsiveImageSelectionOptions? options = null) #

Selects one source using deterministic density preference. Width descriptors are normalized by the first matching supported sizes entry; an omitted or unsupported list falls back to 100vw.

Parameters

srcSet string? required
Authored source-set value.
sizes string? required
Optional source-size list.
defaultSource string? required
Optional src fallback. It participates as 1x only for density sets without an authored 1x candidate.
options OfficeIMO.Html.HtmlResponsiveImageSelectionOptions? = null optional
Selection environment.