Class StyleExtensions
- Namespace
- AngleSharp.Css.Dom
- Assembly
- AngleSharp.dll
A set of extension methods for style / related methods.
public static class StyleExtensions
- Inheritance
-
StyleExtensions
- Inherited Members
Methods
CreateStyleSheetSets(INode)
Creates a new StringList instance with stylesheet sets for the given node.
public static IStringList CreateStyleSheetSets(this INode parent)
Parameters
parent
INodeThe node to get the sets from.
Returns
- IStringList
The new StringList instance.
CreateStyleSheets(INode)
Creates a new StyleSheetList instance for the given node.
public static IStyleSheetList CreateStyleSheets(this INode parent)
Parameters
parent
INodeThe node to get the StyleSheets from.
Returns
- IStyleSheetList
The new StyleSheetList instance.
EnableStyleSheetSet(IStyleSheetList, string)
Sets the enabled style sheet sets in the list of style sheets.
public static void EnableStyleSheetSet(this IStyleSheetList sheets, string name)
Parameters
sheets
IStyleSheetListThe list of style sheets.
name
stringThe name of the set to enabled.
GetAllStyleSheetSets(IStyleSheetList)
Gets all possible style sheet sets from the list of style sheets.
public static IEnumerable<string> GetAllStyleSheetSets(this IStyleSheetList sheets)
Parameters
sheets
IStyleSheetListThe list of style sheets.
Returns
- IEnumerable<string>
An enumeration over all sets.
GetEnabledStyleSheetSets(IStyleSheetList)
Gets the enabled style sheet sets from the list of style sheets.
public static IEnumerable<string> GetEnabledStyleSheetSets(this IStyleSheetList sheets)
Parameters
sheets
IStyleSheetListThe list of style sheets.
Returns
- IEnumerable<string>
An enumeration over the enabled sets.
GetStyleSheets(INode)
Gets an enumeration over all the stylesheets from the given parent.
public static IEnumerable<IStyleSheet> GetStyleSheets(this INode parent)
Parameters
parent
INodeThe parent to use.
Returns
- IEnumerable<IStyleSheet>
The enumeration over all stylesheets.
LocateNamespace(IStyleSheetList, string)
Tries to find the matching namespace url for the given prefix.
public static string? LocateNamespace(this IStyleSheetList sheets, string prefix)
Parameters
sheets
IStyleSheetListThe list of style sheets.
prefix
stringThe prefix of the namespace to find.