Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

HtmlCssNamespaceContext

OfficeIMO.Html.Css

Namespace
OfficeIMO.Html.Css
Assembly
OfficeIMO.Html.Core
Source revision
56dd0d38e0b5 with working tree changes
Modifiers
sealed

Immutable stylesheet-scoped namespace bindings for CSS selectors.

Inheritance

  • object
  • HtmlCssNamespaceContext

Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

public HtmlCssNamespaceContext(string? defaultNamespaceUri = null, IReadOnlyDictionary<string, string>? prefixes = null) #

Creates namespace bindings. A null default leaves unprefixed type selectors namespace-unconstrained.

Parameters

defaultNamespaceUri string? = null optional
prefixes System.Collections.Generic.IReadOnlyDictionary<string, string>? = null optional

Methods

public static HtmlCssNamespaceContext FromStyleSheet(HtmlCssStyleSheet styleSheet) #

Reads valid top-level @namespace declarations from an owned stylesheet.

Parameters

styleSheet OfficeIMO.Html.Css.HtmlCssStyleSheet required
public bool TryGetNamespaceUri(string prefix, out string namespaceUri) #

Resolves a case-sensitive namespace prefix.

Parameters

prefix string required
namespaceUri string required

Returns

bool

Properties

public string? DefaultNamespaceUri { get; } #

The default namespace URI, or null when no default namespace is declared.

public IReadOnlyDictionary<string, string> Prefixes { get; } #

Case-sensitive prefix bindings.