AngleSharp by AngleSharp

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

 StyleSheetExtensions

public static class StyleSheetExtensions
Defines a set of extension methods for style sheets.
public static IEnumerable<T> GetAll<T>(this CssNode node) where T : IStyleFormattable

Gets all descendents of the provided node.

public static IEnumerable<CssNode> GetAllDescendents(this CssNode node)

Gets all descendents of the provided node.

public static CssNode GetAssociatedNode(this CssNode node, IStyleFormattable entity)

Gets the associated for the provided entity, if any.

public static IEnumerable<CssComment> GetComments(this CssNode node)

Gets the comments contained in the CSS node, if any.

public static string GetSource(this CssNode node)

Gets the original source code of the CSS node.

public static IEnumerable<TRule> RulesOf<TRule>(this IEnumerable<IStyleSheet> sheets) where TRule : ICssRule

Gets all rules that are of the provided type.

public static IEnumerable<ICssStyleRule> StylesWith(this IEnumerable<IStyleSheet> sheets, ISelector selector)

Gets all style rules that have the same selector text.