# HtmlCssToken

An immutable token with an exact span in the original UTF-16 source.

Struct 

`OfficeIMO.Html.Css`

**Namespace**

`OfficeIMO.Html.Css`

**Assembly**

`OfficeIMO.Html.Core`

**Source revision**

`56dd0d38e0b5` with working tree changes

**Source**

[HtmlCssToken.cs:81](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L81)

**Base**

`ValueType`

**Modifiers**

sealed

An immutable token with an exact span in the original UTF-16 source.

## Inheritance

- ValueType
- HtmlCssToken

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

- Property [HtmlCssStyleBlock.Tokens](/api/html-core/officeimo-html-css-htmlcssstyleblock/#property-tokens)
- Property [HtmlCssStyleSheet.Tokens](/api/html-core/officeimo-html-css-htmlcssstylesheet/#property-tokens)
- Property [HtmlCssSyntaxDocument.Tokens](/api/html-core/officeimo-html-css-htmlcsssyntaxdocument/#property-tokens)
- Method [HtmlCssTokenizer.Tokenize](/api/html-core/officeimo-html-css-htmlcsstokenizer/#method-tokenize-string-officeimo-html-css-htmlcsstokenizationoptions-threading-cancellationtoken)
- Property [HtmlCssTokenValue.Token](/api/html-core/officeimo-html-css-htmlcsstokenvalue/#property-token)

Filter members 

Show inherited

## Methods

`public string GetText(string source)` [#](#method-gettext-string)

[HtmlCssToken.cs:81](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L81)

Reads the exact authored token text from the source used to tokenize it.

Parameters

**source string required**

Returns

`string`

## Inherited Methods

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

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from ValueType

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from ValueType

Returns

`string?`

## Properties

`public HtmlCssTokenKind Kind { get; }` [#](#property-kind)

[HtmlCssToken.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L70)

The lexical category; tokenization alone does not imply property or rendering support.

`public int Offset { get; }` [#](#property-offset)

[HtmlCssToken.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L72)

Zero-based UTF-16 offset in the original input, before newline normalization.

`public int Length { get; }` [#](#property-length)

[HtmlCssToken.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L74)

Number of original UTF-16 characters, including delimiters and escapes.

`public string? Value { get; }` [#](#property-value)

[HtmlCssToken.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L76)

Decoded identifier, string, URL, dimension unit or delimiter; null for other categories.

`public bool IsIdentifierHash { get; }` [#](#property-isidentifierhash)

[HtmlCssToken.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssToken.cs#L78)

Whether a hash token has the CSS identifier flag.

<!-- PowerForge markdown artifact sha256:185E917395FB9CA4370FF2A14A51E981DD84E00E17D279C497CE6695583C2C87 -->
