# HtmlComputedStyle

Computed-style snapshot for one HTML element.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlComputedStyle.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L95)

**Modifiers**

sealed

Computed-style snapshot for one HTML element.

## Inheritance

- object
- HtmlComputedStyle

## Usage

Explore 5 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.

### Returned or exposed by 4

- Method [HtmlComputedStyleEngine.Compute](/api/html/officeimo-html-htmlcomputedstyleengine/#method-compute-string-officeimo-html-htmlcssmediacontext)
- Property [HtmlSemanticBlock.Style](/api/html/officeimo-html-htmlsemanticblock/#property-style)
- Property [HtmlSemanticRun.Style](/api/html/officeimo-html-htmlsemanticrun/#property-style)
- Property [HtmlSemanticTableCell.Style](/api/html/officeimo-html-htmlsemantictablecell/#property-style)

### Accepted by parameters 1

- Method [HtmlComputedStyleEngine.Summarize](/api/html/officeimo-html-htmlcomputedstyleengine/#method-summarize-collections-generic-ireadonlydictionary-officeimo-html-dom-htmlelement-officeimo-html-htmlcomputedstyle) parameter `styles`

Filter members 

Show inherited

## Methods

`public HtmlCssCascadeTrace? GetCascadeTrace(string propertyName)` [#](#method-getcascadetrace-string)

[HtmlComputedStyle.cs:143](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L143)

Gets an owned cascade explanation, or null when the property's trace slice is not implemented.

Parameters

**propertyName string required**

Returns

`HtmlCssCascadeTrace?`

`public string GetValue(string propertyName)` [#](#method-getvalue-string)

[HtmlComputedStyle.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L95)

Gets a computed property value or an empty string when no value is known.

Parameters

**propertyName string required**

Returns

`string`

`public bool TryGetCascadeTrace(string propertyName, out HtmlCssCascadeTrace? trace)` [#](#method-trygetcascadetrace-string-officeimo-html-css-htmlcsscascadetrace)

[HtmlComputedStyle.cs:134](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L134)

Returns an owned cascade explanation for a property in the implemented grammar slice.

Parameters

**propertyName string required**

**trace OfficeIMO.Html.Css.HtmlCssCascadeTrace? required**

Returns

`bool`

`public bool TryGetTypedValue(string propertyName, out HtmlCssPropertyValue? value)` [#](#method-trygettypedvalue-string-officeimo-html-css-htmlcsspropertyvalue)

[HtmlComputedStyle.cs:108](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L108)

Returns the provider-independent typed value for a computed property when its current OfficeIMO grammar slice accepts the value. Layout-dependent percentages remain in the returned expression until a caller supplies a used-value resolution context.

Parameters

**propertyName string required**

**value OfficeIMO.Html.Css.HtmlCssPropertyValue? required**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyDictionary<string, string> Properties { get; }` [#](#property-properties)

[HtmlComputedStyle.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L82)

All computed properties known to the lightweight style engine.

`public double? ResolvedFontSizePoints { get; internal set; }` [#](#property-resolvedfontsizepoints)

[HtmlComputedStyle.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Styles/HtmlComputedStyle.cs#L88)

Gets the resolved effective font size in points after relative units, percentages, and CSS font-size keywords have been evaluated against their inherited context.

<!-- PowerForge markdown artifact sha256:A7D64FD1AB632D96635AA452224CE4B8EB78DFFCE355D0CA0D492C0637C2A9C9 -->
