Skip to content

Commit d8c4d4b

Browse files
committed
update ComputeDeclarations and ComputeCascadedStyle to take IEnumerable<ICssStyleRule>
1 parent 496da0b commit d8c4d4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AngleSharp.Css/Extensions/StyleCollectionExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static IStyleCollection GetStyleCollection(this IWindow window)
4040
/// <param name="element">The element that is questioned.</param>
4141
/// <param name="pseudoSelector">The optional pseudo selector to use.</param>
4242
/// <returns>The style declaration containing all the declarations.</returns>
43-
public static ICssStyleDeclaration ComputeDeclarations(this IStyleCollection rules, IElement element, String pseudoSelector = null)
43+
public static ICssStyleDeclaration ComputeDeclarations(this IEnumerable<ICssStyleRule> rules, IElement element, String pseudoSelector = null)
4444
{
4545
var computedStyle = new CssStyleDeclaration(element.Owner?.Context);
4646
var nodes = element.GetAncestors().OfType<IElement>();
@@ -74,7 +74,7 @@ public static ICssStyleDeclaration ComputeDeclarations(this IStyleCollection rul
7474
/// <param name="element">The element to compute the cascade for.</param>
7575
/// <param name="parent">The potential parent for the cascade.</param>
7676
/// <returns>Returns the cascaded read-only style declaration.</returns>
77-
public static ICssStyleDeclaration ComputeCascadedStyle(this IStyleCollection styleCollection, IElement element, ICssStyleDeclaration parent = null)
77+
public static ICssStyleDeclaration ComputeCascadedStyle(this IEnumerable<ICssStyleRule> styleCollection, IElement element, ICssStyleDeclaration parent = null)
7878
{
7979
var computedStyle = new CssStyleDeclaration(element.Owner?.Context);
8080
var rules = styleCollection.SortBySpecificity(element);

0 commit comments

Comments
 (0)