Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/AngleSharp.Css.Tests/Declarations/CssBackgroundProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,18 @@ public void CssBackgroundImageNotParsed_Issue66()
var expected = "linear-gradient(0deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 1), rgba(248, 248, 248, 1), rgba(238, 238, 238, 1))";
Assert.AreEqual(expected, property.Value);
}

[Test]
public void CssBackgroundPositionSlashSizeLegal()
{
var snippet = "background: center / cover";
var property = ParseDeclaration(snippet);
Assert.AreEqual("background", property.Name);
Assert.IsFalse(property.IsImportant);
Assert.IsFalse(property.IsInherited);
Assert.IsTrue(property.HasValue);
Assert.AreEqual("center / cover", property.Value);
}
}
}

3 changes: 2 additions & 1 deletion src/AngleSharp.Css/Declarations/BackgroundDeclaration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public ICssValue Convert(StringSource source)

if (c == Symbols.Solidus && size == null)
{
c = source.Next();
c = source.SkipSpacesAndComments();
size = source.ParseSize();
c = source.SkipSpacesAndComments();
Expand Down Expand Up @@ -230,7 +231,7 @@ public ICssValue[] Split(ICssValue value)

return null;
}

private static ICssValue CreateLayers(CssListValue image, CssListValue attachment, CssListValue clip, CssListValue position, CssListValue origin, CssListValue repeat, CssListValue size)
{
var count = GetCount(image, attachment, clip, position, size, repeat, origin);
Expand Down
Loading