AngleSharp by AngleSharp

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

 CssParserExtensions

static class CssParserExtensions
Extensions to be used exclusively by the parser or the tokenizer.
public static CssRule CreateRule(this CssParser parser, CssRuleType type)

Creates a rule with the given type for the provided parser.

public static int GetCode(this CssParseError code)

Retrieves a number describing the error of a given error code.

public static Func<IEnumerable<IConditionFunction>, IConditionFunction> GetCreator(this string conjunction)

Gets the corresponding conjunction creator, if there is any.

public static CssTokenType GetTypeFromName(this string functionName)

Gets the corresponding token type for the function name.

public static bool Is(this CssToken token, CssTokenType a, CssTokenType b)

Checks if the provided token is either of the first or the second type of token.

public static bool IsDeclarationName(this CssToken token)

Checks if the provided token is part of a declaration name.

public static bool IsNot(this CssToken token, CssTokenType a, CssTokenType b)

Checks if the provided token is neither of the first nor the second type of token.

public static bool IsNot(this CssToken token, CssTokenType a, CssTokenType b, CssTokenType c)

Checks if the provided token is neither of the first, nor the second nor the third type of token.

public static DocumentFunction ToDocumentFunction(this CssToken token)

Tries to create an IDocumentFunction from the provided token.