Skip to content

background-size: center / cover fails #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Wayne-Mather opened this issue Dec 27, 2022 · 3 comments
Closed

background-size: center / cover fails #124

Wayne-Mather opened this issue Dec 27, 2022 · 3 comments
Labels

Comments

@Wayne-Mather
Copy link

The following test case will fail as the parser does not parse this valid CSS correctly.

[Test]
public void CssBackgroundSizeCoverCenterTest()
{
    var snippet = "background-size : center / cover";
    var property = ParseDeclaration(snippet);
    Assert.AreEqual("background-size", property.Name);
    Assert.IsFalse(property.IsImportant);
    Assert.IsFalse(property.IsInherited);
    Assert.IsTrue(property.HasValue); // Error - Is False
    Assert.AreEqual("center / cover", property.Value); // Error - Value is empty
}
@FlorianRappl
Copy link
Contributor

PRs are welcome on this one.

@Wayne-Mather
Copy link
Author

PR #125 submitted

@FlorianRappl FlorianRappl added this to the v1.0 milestone Jan 15, 2023
@FlorianRappl
Copy link
Contributor

This is not a valid size. See https://developer.mozilla.org/en-US/docs/Web/CSS/background-size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants