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

shorthandCompacting: background not merging properly with -[webkit|moz|o]-linear-gradient #509

Closed
collinsethans opened this issue Apr 2, 2015 · 6 comments
Labels
Milestone

Comments

@collinsethans
Copy link

I have the below css for transparent facebook logo on a gradient:

.facebook-login {
    background: url(http://www.example.com/fb-logo.png) no-repeat center, -webkit-linear-gradient(top, color1, color2);
    background: url(http://www.example.com/fb-logo.png) no-repeat center, -moz-linear-gradient(top, color1, color2);
    background: url(http://www.example.com/fb-logo.png) no-repeat center, -o-linear-gradient(top, color1, color2);
    background: url(http://www.example.com/fb-logo.png) no-repeat center, linear-gradient(top, color1, color2);
}

Using shorthandCompacting, the above is reduced to:

.facebook-login {background: url(http://www.example.com/fb-logo.png) no-repeat center, linear-gradient(top, color1, color2);}

Due to this, the fb logo is not shown on several browsers.

I have current work-around by setting shorthandCompacting: false.

@jakubpawlowicz
Copy link
Collaborator

@collinsethans Thanks for raising this issue. I'm currently at the point of rewriting compacting code so will definitely look at it soon.

@collinsethans
Copy link
Author

@jakubpawlowicz Thanks for acknowledging, it will be great to have these fixed. I am currently using this on production, will you have a ballpark timeline by when you may have the new code released?

Another feature that I was thinking will help much here is if there's some log on what gets compacted and/or optimized to what. That will give us a lot of confidence when using in production. (The above bug went unnoticed and was pointed by an user after a week of release). Will you have any plans on adding such logging feature?

@jakubpawlowicz
Copy link
Collaborator

I plan to release 3.2 in 1-2 weeks from now, as I'm nearing completion of internals rewrite.

Interesting idea about the log. It could be rather verbose unless we'd narrow it to something like shorthand compacting only.

@collinsethans
Copy link
Author

@jakubpawlowicz Hi, thanks for the timeline.

Yes, the logs will be very verbose, but then it's easier to validate the output and issue identification is quick, thus builds confidence. And, it will run only with a switch, non-default. To begin with, it can be for anything and everything that the tool is going to optimize in the file.

@jakubpawlowicz
Copy link
Collaborator

@collinsethans let's see what can be done here. It would need to provide a list of optimizations made to properties and selectors, which won't be straightforward to add. I've opened #514 to cover it.

@jakubpawlowicz
Copy link
Collaborator

Fixed in master with #490.

@jakubpawlowicz jakubpawlowicz added this to the 3.2 milestone Apr 13, 2015
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