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

Fail to compile compass linear gradients correctly #78

Closed
ronnix opened this issue Dec 8, 2012 · 4 comments
Closed

Fail to compile compass linear gradients correctly #78

ronnix opened this issue Dec 8, 2012 · 4 comments

Comments

@ronnix
Copy link

ronnix commented Dec 8, 2012

Here is a source example:

@import "compass/css3";

.test {
    @include background-image(linear-gradient(#000, #FFF));
}

Here is the exepected output (using Ruby sass):

.test {
  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(100%, #ffffff));
  background-image: -webkit-linear-gradient(#000000, #ffffff);
  background-image: -moz-linear-gradient(#000000, #ffffff);
  background-image: -o-linear-gradient(#000000, #ffffff);
  background-image: -ms-linear-gradient(#000000, #ffffff);
  background-image: linear-gradient(#000000, #ffffff); }

Here is the libsass output:

.test {
  background-image: -owg(linear-gradient(black, white));
  background-image: -webkit(linear-gradient(black, white));
  background-image: -moz(linear-gradient(black, white));
  background-image: -o(linear-gradient(black, white));
  background-image: linear-gradient(black, white); }
@akhleung
Copy link

Ooh, it looks like Compass's linear-gradient function is defined in Ruby, so LibSass can't use it. We currently require custom functions to be defined in SassScript (like in Bourbon, which we do test against).

@ronnix
Copy link
Author

ronnix commented Dec 10, 2012

Did not realize that some parts of Compass depended on custom ruby extensions. I guess this means I cannot use libsass if I want to use Compass? Or do you know if the Compass people plan to make it more portable?

@akhleung
Copy link

Ah, yes, much of Compass is actually implemented in Ruby -- it currently won't work with LibSass. I believe there are long-term plans to port it over, but it's at least several months off. LibSass would first need to provide some kind of foreign-function interface (currently in the works), and then Compass itself would need to be ported to take advantage of it.

@ronnix
Copy link
Author

ronnix commented Dec 10, 2012

Thanks for the explanation!

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

No branches or pull requests

2 participants