Grunt-sass can't compile sass maps? - sass

I want to use this MQ Mixin, but I'm getting an error when trying to compile this mixin:
Warning: C:/xxxxx/mq:13: error: error reading values after mobile
I'm using Grunt with grunt-sass plugin to compile my sass. My first thought was that I am using the old version of grunt-sass that does not support sass maps, and I was partially right because I was using the older version. Quick update to the latest version (at the moment - 0.14.0) and nothing, still getting same error. Also I checked if the error occurs with ruby-sass (v.3.3.14) but does't, file compiles properly. So, what's going on with grunt-sass? What am I missing here? Thanks in advance.

As cimmanon mentioned, grunt-sass is using libsass, which is far behind on features. You should use grunt-contrib-sass instead, which compiles using Ruby sass. You will need Ruby and the sass gem installed for it to work.

Related

How to use SassC on OSX

I have used sass before and it's great. But Slow. And ruby Sass is being dropped.
I'd like to swtich to a wrapper around libsass. I think that is the accepted upgrade path.
How do I do this? I've tried installing SassC via homebrew, but it doesn't seem to work the same way.
eg
sassc --watch scss:css --style compressed
fails with error, unrecognized option `--watch'
What do I need to do to get sass compilation working in the terminal using libsass?
There was a discussion in the issue section of this project. It is not implemented and nobody was working on it according to this thread. But several workarounds were posted (e.g. using fswatch or node-sass). One suggestion was to use gosass which looks quite young but supports your -watch option.
Maybe this is something for you. If not you will find probably a lot of wrappers for libsass out there.

Can you download the compass/css3 file?

I can't get ruby running and i dont want to go through all the hurdles of fighting with my osx version of ruby.
I downloaded dart sass which has no support for compass since it's deprecated. I'm trying to get my old sass code to work while I work on replace all my mixin that I used that rely on compass.
Is there a way I can download the compass/css3 mixin stylesheet?
I found their site http://compass-style.org/reference/compass/css3/ other than going through each page and copying all the code. Is there no master code file that I can download all the mixins?
Thank you.

grunt-sass (with bower compass package) throwing error on compile

I am trying out grunt-sass (instead of grunt-contrib-watch) to use the super speedy libsass compiler.
I've managed to get it working with compass by using a compass bower package. (https://github.com/Igosuki/compass-mixins) So the compass mixins are available. However I am getting the following error
error: only variable declarations and control directives are allowed inside functions
The error is pointing to an #if statement in one of my function calls (i've tried removing that function but it just then fails at the next #if statement).
If I omit my functions file I then get another error, pointing to one of my mixins
error: expected '{' in media query Use --force to continue.
Does anyone have any idea what's going on?
All of this stuff was working when using grunt-contrib-watch.
Thanks
With no actual sass file to look at I assume that you are using features that aren't implemented in libsass yet. To quote from the offical node-sass repo (on which grunt-sass) is based on:
The libsass library is not currently at feature parity with the 3.2
Ruby Gem that most Sass users will use, and has little-to-no support
for 3.3 syntax. While we try our best to maintain feature parity with
libsass, we can not enable features that have not been implemented in
libsass yet.

Is it possible to use Devtools' Sass support with Scout?

I'm using Scout as SASS compiler. I would like to know if there's a way to configure Scout to work with DevTools Sass support.(Auto reload css upon save). I assume installing Scout should install Compass and SASS in my machine. When I tried 'compass' in the terminal, I get 'compass: command not found'.
Do I have to install sass separately for this to work?
Thanks a lot!
Thanks for the response guys. It seems like the version of SASS ScoutApp is using doesnt have source map support. According to this article, you need Sass 3.3.

getting error after ugrading to sass-3.1.8

after upgrading to sass-3.1.8 form sass-3.1.7 I get this error:
Functions may only be defined at the root of a document.
any Idea how I can solve this?
I'm using some of bourbon's mixins and it's imported at the top of my stylesheets, that's all.
I have the same problem and could not solve it by modifying code.
The way I solved was to use an older version:
gem uninstall sass
gem install sass -v 3.1.1
Ok Here is what I come up with:
SASS team decided to make a change (in this case "Functions may only be defined at the root of a document.") that made some plugins incompatible. in my case it was bourbon library. I made a ticket on github homepage of the bourbon and the owner updated the code and released a new version that's working with latest api.
I think this change should have got a bigger version bump to indicate the api change.
Sass developer here. Mixins and functions were never meant to be allowed in a scoped context. A bug was fixed recently that caused them to be caught when in an imported file (before this fix they were only caught if defined in the primary sass file).
That said, it's not a feature we're explicitly opposed to, but we'd would need to properly test it, document it, and support it as an official feature.

Resources