compass compile error (undefined mixin "set-legacy-ie-support") - compass-sass

For the last 2 days I get this error while compiling my sass files.
Compass was unable to compile one or more files in the project:
error style.scss (Line 58 of _media.scss: Undefined mixin 'set-legacy-ie-support'.)
create style.css
I do have the following libraries installed
breakpoint-1.3 compass-0.12.2 rubygems-update-1.8.24 sassy-buttons-0.1.4
chunky_png-1.2.6 fssm-0.2.9 sass-3.2.1 susy-1.0.5
Can anybody tell me where this mixin supposed to be? If I do a recursive search in /Library/Ruby there ain't no mixin with that name. I can't figure it out. Please someone?
Regards Norman

Related

Sass Error: Undefined Variable, even though it is declared

So I have installed and compiled Sass and it's all perfectly fine working. But I have tried to declare variables, which give me an error message, but I have no idea why.
$black: #333
$pale: #d2e1dd
$pink: #c69
$blue: #036
body
background: $black
The error message is:
Undefined variable: "$black"
Could it be that it has something to do with Ruby since I installed and compiled sass with it?
I faced the same issue with Sass, in my case the error was because I included the variables file after the other file where I used them, you could try doing this, reorder files import, make the variables file at the top.

How to switch from Compass to Laravel Elixir

I've been using Compass to compile Sass in my project, but it is now deprecated and no longer maintained so I want to move away from using Compass. The project uses PHP and Laravel, so I would like to use Laravel Elixir for compiling the Sass files instead.
Is there a way to transfer my .scss files from Compass to Elixir without going in and changing all the places in my Sass code that I use Compass helpers, or do I need to more or less re-write my Sass files? There are a ton of them, so I would love to avoid that.
On the suggestion of my co-worker, what I tried was to add the compass files to my resources/assets/sass directory (includes compass/css3, compass/layout, compass/reset, compass/typography, and compass/utilities, as well as several other .scss files included in Compass. The hope was that by including these files, the functions of Compass would still apply outside of it.
When I try to compile with gulp, the error I'm currently getting (although I'm guess I'll run into another one once this is fixed) is:
>> Sass Compilation Failed: resources/assets/sass/compass/_support.scss
Error: Undefined operation: "prefix-usage(browser-prefixes(browsers()), css-transitions, (full-support: true), (partial-support: true)) gt 0.1".
on line 324 of resources/assets/sass/compass/_support.scss
>> #if $usage > $threshold {
------^
My guess is that I will need to go ahead and remove the Compass stuff from the Sass code manually, but I'm hoping someone else has a better solution for me! Thanks.

How to use sass variables in my own scss files

I just started with materialize but now I'm faced with a problem.
When I want to use: #media #{$small-and-up} { media query in my own scss file I get the following error: Error: Undefined variable: "$medium-and-up". While I'm importing the materialize.css file which is compiled from /sass/materialized.scss.
So my question is how can I use the variables / media querys in my own scss file?
I compile the scss by the file watcher plug-in in PHPStorm or by sass compiler installed in command prompt windows.
I hope someone can help me.
SASS variables don't exist in compiled CSS files. If you want to use variables defined in materialized.scss in your own SCSS stylesheet, you need to insert #import "sass/materialized.scss" in your stylesheet.
Incidentally, if you do this, you probably won't need to compile materialized.scss any more. Just compile your SCSS stylesheet, which, because of the #import statement, will pull in materialized.scss.
UPDATE:
After reviewing code at https://github.com/SuperDJ/dsuper/blob/master/private/admin/css/sass/opening.scss, it seems the problem is with this line:
#import url(/private/admin/css/material/sass/materialize.scss);
This is not valid syntax in SCSS. It should be:
#import "../material/sass/materialize";

#import "breakpoint"; throws not found error

I was working on this project yesterday using Sass and Breakpoint and everything was fine. This morning however when I went to compile using sass --watch .. I am getting this error:
error ../sass/screen.scss (Line 6: File to import not found or unreadable: breakpoint.
Load path: /Users/MOD3/Sites/GABE/stylesheets/stylesheets)
I am not sure why it is not finding breakpoint anymore but I am sure it is installed. I read something about it needing to be an absolute path, but where do I get that path from? Any idea how to fix this? It was working yesterday...
Breakpoint currently does not work with vanilla Sass as it requires a small bit of Ruby that is not available until Sass 3.3. My intuition is that you probably ran sass --compass --watch to allow Breakpoint to run through Compass. If not, I would highly encourage you to compile through Compass or Breakpoint will not work as expected.
UPDATE:
Issue was solved by running compass watch from same folder as config.rb.

Compass compiler errors out every other time

I have a Grunt task for compiling scss files using Compass and build fails every other time. When I change a file that uses a Compass mixin, e.g. #import box-sizing(border-box), it fails and says that plugin is not included (it actually is included in a file "all.scss" using #import "compass/css3/box-sizing", and then it includes other scss files.
Second time (after you see the error) you try to compile it, it works just fine. I guess the reason is that if other files (specifically my "all.scss" file) has not been changed, it skips it during compilation, so include is not found.
Also, if I use require 'box-sizing' or require "compass/css3/box-sizing" in config.rb, it also fails saying that it can't find this plugin.
Any idea what's the cause?
box-sizing is a mixin, so you want to #include it, not #import:
#include box-sizing(border-box);
As you were importing it, the compiler treats it as a Compass extension, which is missing in the config.rb. But it's not an extension in the first place, it's part of Compass in the first place!
So changing #import to #include will solve your issue.
See http://sass-lang.com/#mixins for syntax.

Resources