# HtmlCssRule

Base type for a CSS at-rule or qualified rule.

Class 

`OfficeIMO.Html.Css`

**Namespace**

`OfficeIMO.Html.Css`

**Assembly**

`OfficeIMO.Html.Core`

**Source revision**

`56dd0d38e0b5` with working tree changes

**Source**

[HtmlCssRules.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssRules.cs#L23)

**Base**

`HtmlCssSyntaxNode`

**Modifiers**

abstract

Base type for a CSS at-rule or qualified rule.

## Inheritance

- [HtmlCssSyntaxNode](/api/html-core/officeimo-html-css-htmlcsssyntaxnode/)
- HtmlCssRule

## Derived Types

- [HtmlCssAtRule](/api/html-core/officeimo-html-css-htmlcssatrule/)
- [HtmlCssQualifiedRule](/api/html-core/officeimo-html-css-htmlcssqualifiedrule/)

## Usage

Explore 4 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

- Property [HtmlCssAtRule.Rules](/api/html-core/officeimo-html-css-htmlcssatrule/#property-rules)
- Property [HtmlCssQualifiedRule.Rules](/api/html-core/officeimo-html-css-htmlcssqualifiedrule/#property-rules)
- Property [HtmlCssRule.Rules](/api/html-core/officeimo-html-css-htmlcssrule/#property-rules)
- Property [HtmlCssStyleSheet.Rules](/api/html-core/officeimo-html-css-htmlcssstylesheet/#property-rules)

Filter members 

Show inherited

## 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 string GetText()` [#](#method-gettext)

[HtmlCssSyntaxNode.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssSyntaxNode.cs#L94)

Inherited from [HtmlCssSyntaxNode](/api/html-core/officeimo-html-css-htmlcsssyntaxnode/)

Returns

`string`

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

Inherited from object

Returns

`Type`

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

[HtmlCssSyntaxNode.cs:96](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssSyntaxNode.cs#L96)

Inherited from [HtmlCssSyntaxNode](/api/html-core/officeimo-html-css-htmlcsssyntaxnode/)

Returns

`string`

## Properties

`public IReadOnlyList<HtmlCssComponentValue> Prelude { get; }` [#](#property-prelude)

[HtmlCssRules.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssRules.cs#L23)

Component values before the rule block or terminator.

`public string PreludeText { get; }` [#](#property-preludetext)

[HtmlCssRules.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssRules.cs#L27)

Exact source text before the rule block or at-rule terminator.

`public HtmlCssSimpleBlock? Block { get; }` [#](#property-block)

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

The exact curly block, or null for a statement at-rule.

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

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

Best-effort syntax-only declarations and nested rules in a block, in authored order.

`public IReadOnlyList<HtmlCssDeclaration> Declarations { get; }` [#](#property-declarations)

[HtmlCssRules.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssRules.cs#L41)

Direct declarations in the rule block, in authored order.

`public IReadOnlyList<HtmlCssRule> Rules { get; }` [#](#property-rules)

[HtmlCssRules.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssRules.cs#L45)

Direct nested at-rules and qualified rules, in authored order.

## Inherited Properties

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

[HtmlCssSyntaxNode.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssSyntaxNode.cs#L88)

Inherited from [HtmlCssSyntaxNode](/api/html-core/officeimo-html-css-htmlcsssyntaxnode/)

`public HtmlCssSourceSpan Span { get; }` [#](#property-span)

[HtmlCssSyntaxNode.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/56dd0d38e0b526611c1af001c026f8c72600880f/OfficeIMO.Html.Core/Css/HtmlCssSyntaxNode.cs#L90)

Inherited from [HtmlCssSyntaxNode](/api/html-core/officeimo-html-css-htmlcsssyntaxnode/)

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