Syntax error: Undefined mixin 'linear-gradient'

4,807 views
Skip to first unread message

Amit

unread,
Apr 16, 2012, 8:41:18 PM4/16/12
to compas...@googlegroups.com
Hi!

I apologize in advance for my lack of knowledge in this area. I'm working with a web designer who is using Compass to manage stylesheets and he has no problem compiling the .scss files into css. When I tried to run it, however, I get this error: "Syntax error: Undefined mixin 'linear-gradient'". I'm using Compass 0.12.1 and Sass 3.1.15. I run compass with "compass watch". The app I'm working on is a Django app. I've seen this error has come up in the newsgroup, but I haven't been able to narrow down the problem. Thanks for your help!

-Amit

Leon de Rijke [CMS Works]

unread,
Apr 17, 2012, 2:59:08 AM4/17/12
to compas...@googlegroups.com
Hi Amit,

Have you imported the linear-gradient mixin correctly? You should have something like ' @import "compass/css3/images";' in the .scss file, then you can use the mixins provided by this file. The linear-gradient mixin is part of the Images file.

See Compass Images and Demo: Background Gradients for more info.

Hope this helps!

Leon

Op 17-04-12 02:41, Amit schreef:
Hi!

I apologize in advance for my lack of knowledge in this area. I'm working with a web designer who is using Compass to manage stylesheets and he has no problem compiling the .scss files into css. When I tried to run it, however, I get this error: "Syntax error: Undefined mixin 'linear-gradient'". I'm using Compass 0.12.1 and Sass 3.1.15. I run compass with "compass watch". The app I'm working on is a Django app. I've seen this error has come up in the newsgroup, but I haven't been able to narrow down the problem. Thanks for your help!

-Amit
--
You received this message because you are subscribed to the Google Groups "Compass" group.
To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/HME_68hi6AUJ.
To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.

Amit

unread,
Apr 17, 2012, 4:23:29 PM4/17/12
to compas...@googlegroups.com
Thanks for the reply, Leon! I already have '@import "compass/css3";' in the beginning of the include file, so that should include images, right? I also tried adding compass/css3/images and I was getting the same error. The master .scss file looks like this:

@import "partials/mixins";
@import "partials/variables";
...
@import "partials/another_file";

and partials/mixins has this:

@import "compass/css3";
...

Then the linear gradient error shows up in partials/another_file. Please let me know if you need more information.

-Amit
To unsubscribe from this group, send email to compass-users+unsubscribe@googlegroups.com.

Chris Eppstein

unread,
Apr 17, 2012, 7:09:56 PM4/17/12
to compas...@googlegroups.com
The linear-gradient mixin was deprecated in 0.11 and you were supposed to stop using it before you upgraded to 0.12. You need to use the new images module which more closely matches the css3 syntax.


Note, if you skipped the 0.11 release and went straight from 0.10 to 0.12, you probably should downgrade, make sure all the deprecation warnings are cleared up, and then upgrade again. You can specify installing a version 0.11 release by passing --version "~> 0.11.0" to the gem install command and you can specify running that version like this:

compass _0.11.7_ compile --force

Chris

To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/GLC-k9MbrgYJ.

To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.

Amit

unread,
Apr 17, 2012, 7:21:03 PM4/17/12
to compas...@googlegroups.com
Thanks, that fixed it! It thought my web designer was using the latest version of Compass, but he wasn't getting any errors so I guess there was some miscommunication there.

-Amit 


On Tuesday, April 17, 2012 7:09:56 PM UTC-4, Chris Eppstein wrote:
The linear-gradient mixin was deprecated in 0.11 and you were supposed to stop using it before you upgraded to 0.12. You need to use the new images module which more closely matches the css3 syntax.


Note, if you skipped the 0.11 release and went straight from 0.10 to 0.12, you probably should downgrade, make sure all the deprecation warnings are cleared up, and then upgrade again. You can specify installing a version 0.11 release by passing --version "~> 0.11.0" to the gem install command and you can specify running that version like this:

compass _0.11.7_ compile --force

Chris
Reply all
Reply to author
Forward
0 new messages