Skip to content
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

Add support for background-size in the shorthand property #65

Merged

Conversation

mitio
Copy link
Contributor

@mitio mitio commented Mar 16, 2016

The background property supports background size in addition to the other long-form properties. When we have a separate background-size property and when we create a shorthand version, we must include the background-size in the shorthand by preceding it with a slash: / and vice versa—when we’re parsing a shorthand property, we must look for and fetch the background-size before we extract
background-position as otherwise it might be ambiguous.

This should fix premailer/premailer#252 and premailer/premailer#216.

The “background” property supports background size in addition to the
other long-form properties. When we have a separate “background-size”
property and when we create a shorthand version, we must include the
background-size in the shorthand by preceding it with a  slash: /
And vice versa—when we’re parsing a shorthand property, we must look
for and fetch the “background-size” before we extract
“background-position” as otherwise it might be ambiguous.
grosser added a commit that referenced this pull request Mar 16, 2016
Add support for background-size in the shorthand property
@grosser grosser merged commit 35cfd36 into premailer:master Mar 16, 2016
@grosser
Copy link
Contributor

grosser commented Mar 16, 2016

thx, 1.4.0 is out!

@mitio mitio deleted the add-background-size-shorthand-support branch March 16, 2016 21:25
@mkigikm
Copy link
Contributor

mkigikm commented Mar 16, 2016

Just fyi, I had been working on a fix for this today, and a background shorthand with size cannot be read by yahoo mail. Not sure if you guys are worried about those kind of vendor-specific issues though.

@mitio
Copy link
Contributor Author

mitio commented Mar 16, 2016

@mkigikm I think that when you "compact" a bunch of properties into their shorthand, you should try to comply with the standards, meaning that if there's a background-size, you should put it there (unless you make it important in which case it will stay as a standalone one).

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

Successfully merging this pull request may close these issues.

background-size shorthand getting stripped after inline
3 participants