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

Background-Color issue #695

Closed
TheSteveMol opened this issue Oct 21, 2015 · 4 comments
Closed

Background-Color issue #695

TheSteveMol opened this issue Oct 21, 2015 · 4 comments
Labels
Milestone

Comments

@TheSteveMol
Copy link

I'm using a linear-gradient as the background in some divs. On older browsers, that's not supported, so I'm using background-color to provide an acceptable fallback. clean-css is removing the background-color, probably because it wouldn't be used on a newer browser, but it needs to be there to support the older ones.

header {
background-color: #a7cfd9; /* Old browsers / / This line removed by clean-css */
background: linear-gradient(#7ba5b4, #a7cfd9);
top: 50px;
height: 75px;
width: 100%;
position: absolute;
}

@ngyikp
Copy link
Contributor

ngyikp commented Oct 21, 2015

Temporary fix is to change

background: linear-gradient(#7ba5b4, #a7cfd9);

to

background-image: linear-gradient(#7ba5b4, #a7cfd9);

but this does seem to be a bug in clean-css nonetheless.

@TheSteveMol
Copy link
Author

Thanks for the tip! I manually went and added the missing attribute back into the minified file, but that's a pain if (when) changes will be made.

@jakubpawlowicz
Copy link
Collaborator

Thanks guys for reporting, this is certainly a bug, fix is coming. 👍

@jakubpawlowicz jakubpawlowicz modified the milestone: 3.4.7 Oct 29, 2015
jakubpawlowicz added a commit that referenced this issue Nov 2, 2015
A longhand value should not be overriden by a shorthand with
a function value, e.g.

```css
div {
  background-color: red;
  background: linear-gradient(red, blue);
}
```
@jakubpawlowicz
Copy link
Collaborator

Out in 3.4.7!

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

3 participants