-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
CSS: incorrect minification of background shorthand #247
Comments
It was getting confused by the |
@tdewolff 87dacf4 has restored the slash & auto, but Chrome thinks the new CSS is also invalid: background: #fff url(foo.svg) no-repeat 100% .75rem 50%/auto calc(100% - 1.5rem) Swapping the 100% and 50% back to right and center respectively causes Chrome to accept it: background: #fff url(foo.svg) no-repeat right .75rem center/auto calc(100% - 1.5rem) |
You are right, I've had an error in my assumptions. To sum up, these are valid values:
In the last case, we can minify |
/me renames CSS to complicated style sheets :-P Thanks for looking into this more @tdewolff, I look forward to testing whatever fix you come up with. |
Additionally I've found that |
@tdewolff I can confirm that the recent commit has fixed all my issues, awesome work, thanks! :-) |
If you write your background CSS across three properties like so:
Then all is right with the world and it is minified to this:
However if you combine the properties into one:
Then the following invalid CSS is produced:
There's two bugs here, adding the forward slash back in between the
.75rem
and the50%
causes it to be valid, but it still looks wrong.The original
right .75rem center / auto calc(100% - 1.5rem)
is needed to correctly display that image to the right of the element, .75 rem from each edge.The text was updated successfully, but these errors were encountered: