AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.3.0" />

 CSSRule

public abstract class CSSRule : ICSSObject
Represents a CSS rule.

The parent stylesheet.

protected CSSRule _parentRule

The parent rule.

protected CssRuleType _type

The type of CSS rule.

public string CssText { get; }

Gets the textual representation of the rule.

public CSSRule ParentRule { get; }

Gets the containing rule, otherwise null.

Gets the CSSStyleSheet object for the style sheet that contains this rule.

public CssRuleType Type { get; }

Gets the type constant indicating the type of CSS rule.

public abstract string ToCss()

Returns a CSS code representation of the rule.