diff --git a/src/AngleSharp.Css.Tests/Declarations/CssBackgroundProperty.cs b/src/AngleSharp.Css.Tests/Declarations/CssBackgroundProperty.cs index 03d9da7..5ba9927 100644 --- a/src/AngleSharp.Css.Tests/Declarations/CssBackgroundProperty.cs +++ b/src/AngleSharp.Css.Tests/Declarations/CssBackgroundProperty.cs @@ -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); + } } } diff --git a/src/AngleSharp.Css/Declarations/BackgroundDeclaration.cs b/src/AngleSharp.Css/Declarations/BackgroundDeclaration.cs index 985f23a..cd6d373 100644 --- a/src/AngleSharp.Css/Declarations/BackgroundDeclaration.cs +++ b/src/AngleSharp.Css/Declarations/BackgroundDeclaration.cs @@ -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(); @@ -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);