AngleSharp.Css by AngleSharp

<PackageReference Include="AngleSharp.Css" Version="0.15.1" />

 StyleSheetExtensions

public static class StyleSheetExtensions
Useful extensions for dealing with stylesheets.
public static IDocument GetDocument(this IStyleSheet sheet)

Gets the associated document of the sheet if any.

Gets the styles matching the given render device.

public static IEnumerable<TRule> GetRules<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.