Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Linear gradient forcing 'top' at the beginning of the argument list #6

Closed
mejibyte opened this issue Aug 5, 2011 · 2 comments
Closed

Comments

@mejibyte
Copy link

mejibyte commented Aug 5, 2011

Hello,

I added the following example form the README to my stylesheet:

@include linear-gradient(50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);

The actual styles that are being generated are:

background-color: 50deg;
background-image: -webkit-gradient(linear, left top, left bottom, from(50deg), to(#1e5799 0%));
/* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, 50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: -moz-linear-gradient(top, 50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: -ms-linear-gradient(top, 50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: -o-linear-gradient(top, 50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: linear-gradient(top, 50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);

This doesn't work as expected.

It looks like bourbon is forcing a top argument at the beginning of the argument list, and then it thinks the 50deg parameter is the first color of the gradient.

The styles that should have been generated should look something like:

background-image: -webkit-linear-gradient(50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: -moz-linear-gradient(50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: -ms-linear-gradient(50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: -o-linear-gradient(50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
background-image: linear-gradient(50deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
mejibyte pushed a commit to mejibyte/bourbon that referenced this issue Aug 5, 2011
@plapier
Copy link

plapier commented Aug 5, 2011

That doesn't actually compare the value of the variable to the string "transparent", which is what is needed to fix the bug. Thanks for reporting the issue though. The bug has been fixed in version 0.1.3.
4802351
30bb878

@plapier plapier closed this as completed Aug 5, 2011
@mejibyte
Copy link
Author

mejibyte commented Aug 5, 2011

Glad I could help. Thanks for the fix!

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

No branches or pull requests

2 participants