# HtmlCssSyntaxDocument

Base type for a source-preserving CSS syntax result.

Class 

`OfficeIMO.Html.Css`

**Namespace**

`OfficeIMO.Html.Css`

**Assembly**

`OfficeIMO.Html.Core`

**Source revision**

`56dd0d38e0b5` with working tree changes

**Source**

[HtmlCssStyleSheet.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L37)

**Modifiers**

abstract

Base type for a source-preserving CSS syntax result.

## Inheritance

- object
- HtmlCssSyntaxDocument

## Derived Types

- [HtmlCssStyleBlock](/api/html-core/officeimo-html-css-htmlcssstyleblock/)
- [HtmlCssStyleSheet](/api/html-core/officeimo-html-css-htmlcssstylesheet/)

Filter members 

Show inherited

## Methods

`public HtmlCssSourcePosition GetPosition(int offset)` [#](#method-getposition-int32)

[HtmlCssStyleSheet.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L37)

Maps an exact UTF-16 offset to a one-based line and column.

Parameters

**offset int required**

Returns

`HtmlCssSourcePosition`

`public string ToCss()` [#](#method-tocss)

[HtmlCssStyleSheet.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L44)

Returns the original input unchanged.

Returns

`string`

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

[HtmlCssStyleSheet.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L46)

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

## 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`

## Properties

`public string Source { get; }` [#](#property-source)

[HtmlCssStyleSheet.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L28)

Exact original CSS input.

`public IReadOnlyList<HtmlCssToken> Tokens { get; }` [#](#property-tokens)

[HtmlCssStyleSheet.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L30)

All lexical tokens, including trivia and the final end-of-input token.

`public IReadOnlyList<HtmlCssSyntaxNode> Contents { get; }` [#](#property-contents)

[HtmlCssStyleSheet.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L32)

Rules, declarations, and invalid recovered source in authored order.

`public IReadOnlyList<HtmlCssSyntaxDiagnostic> Diagnostics { get; }` [#](#property-diagnostics)

[HtmlCssStyleSheet.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssStyleSheet.cs#L34)

Syntax recovery diagnostics. Unknown names and values do not produce diagnostics.

<!-- PowerForge markdown artifact sha256:328CA3B695C298A8F15C18D2BEADACBB4C7828DA36E1CDAC97BB0B7843970407 -->
