Issues with upgrading gems - compass-sass

i've started a project with compass 0.12 and sass 1 and susy 1.0.9.Now i want to resume it and i done an upgrade for gems.So i have now newers versions for compass (1.0.1), sass (3.4.0, 3.2.12)
ans susy (2.1.3).
So i found a fix to use old syntax for susy 1,
#import "susyone";
but i still get errors for compass:
(Line 280 of /var/lib/gems/1.9.1/gems/compass-core-1.0.1/stylesheets/compass/_support.scss: List index is 2 but list is only 1 item long for `nth')
This nth is used for an additional buttons styles.So i don't find other ways to fix this.
Can i specify a compass version to use ?
Thanks

This seems to be the same issue documented on github here and in Compass here. I'm not sure about any work-arounds at this point, besides turning off grid-image output for the time being.

Related

Can`t make susy start working

I wanted to start a project with Sass / Compass and for grid I want to use susy.
Installed sass -v 3.4.24
Compass 1.0.3
All good and working. After I installed susy 3.0.6 and not working then I tried 2.2.12, and use the simple code body { #include container(80em); }
I get the Undefined mixin 'container' all the time.
What do i do wrong?
I don't recommend using Compass, since it is no longer maintained and Susy 3 no longer supports it. With Susy 2, it should work, but you will have to require and import Susy before it will work. Installing is not enough.
There are some brief instructions in the Susy docs.
Specifically, those commands add a require 'susy' line to the compass config, and an import 'susy' line in the Sass/Scss.
Since Compass is no longer maintained, I'm a bit fuzzy on exactly how the config/require is supposed to look.

Can't compile rwd skin SCSS in Magento CE 1.9

I am attempting to create a Magento skin based off of the rwd skin provided in CE 1.9 / EE 1.14. However when I attempt to compile the SCSS (on a clean install, after deleting the files in /skin/frontend/rwd/default/css), I get the following error:
$ compass compile scss
write css/madisonisland-ie8.css
write css/madisonisland.css
write css/scaffold-forms.css
error scss/styles-ie8.scss (Line 541 of scss/core/_common.scss: Invalid CSS after "a:not(": expected ")", was "".button")")
Sass::SyntaxError on line ["541"] of /var/www/development/magento-mirror/skin/frontend/rwd/default/scss/core/_common.scss: Invalid CSS after "a:not(": expected ")", was "".button")"
Run with --trace to see the full backtrace
Line 541 in scss/core/_common.scss is:
a:not(".button") {
And if I remove the surrounding quotes from .button - it compiles successfully. However, as this is a fresh install of Magento, should I really need to be editing files in order to get them to compile? Could there be a config setting in compass I have missed etc?
Thanks
I too experienced this issue while doing exactly the same as Tom Griffin - creating a new custompackage/customtheme with rwd/default as the parent.
Copying core/_common.scss into my customtheme folder and removing the quotes as per Tom's initial message fixes the issue and allows compass to compile correctly.
It's quite poor that Magento is shipping with invalid SCSS files which don't compile. Certainly hasn't helped me when learning SASS and Compass for the first time!
As Tom postulated perhaps it's a SASS/Compass version or setting which the Magento theme developers have. I am using SASS 3.4.1 and Compass 1.0.0.
Thanks
Tom
Open scss/core/_common.scss and edit line 541 only remove quotes from ".button"
a:not(.button) {
This is a compatibility issue with compass. When the Magento 1.9 rwd theme was shipped, the latest version of compass was 0.12.6 which compiled correctly. I have at least tested with 1.12.3 and had no problems compiling. I suspect this will be fixed in the next release since the developers will have been compiling on a later version of compass as they came out. Removing the quotes will achieve your desired result and compiles correctly under the 1.0.0 & 1.0.1 versions at least. This really is more of a compass compatibility issue than a Magento core bug but I am sure it will be taken care of soon.

error compiling susy2 with gulp

I have a very simple gulp based test environment using only sass and the susy2 gem - no compass because compass is no longer a dependency of susy 2
The error i'm getting is
...sass/susy/language/susy/settings:8:error: error reading values after container
line 8 of the problem file, susy's settings is as follows:
#include susy-defaults((
container: auto, <- line 8
math: fluid,
output: float,
container-position: center,
gutter-position: after,
global-box-sizing: content-box,
debug: (
image: hide,
color: rgba(#66f, .25),
output: background,
toggle: top right,
inspect: false,
),
));
I'm using sass version 3.4, which should support the sass maps syntax, and gulp-sass version 0.7.3. along with susy 2.1.3.
Any idea why im getting this error?
You must update SASS to later than 3.3. Current version of SASS as of this writing is 3.4.1 Selective Steve. Type sass -v in your terminal (assuming OSX) to see what version of SASS you are currently on.
gulp-sass is actually a wrapper around Node-sass, which again is a library
that provides binding for Node.js to libsass, the C version of the popular
stylesheet preprocessor, Sass.
It allows you to natively compile .scss files to css at incredible speed and
automatically via a connect middleware.
As this node-sass page says:
"..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."
So it does not matter which version of sass you have installed,
because gulp-sass is not using it.
The problem that arises with susy2 is that of, libsass currently not
supporting some of features susy2 exposes.
The way I resolved this issue, was using
gulp-ruby-sass instead of
gulp-sass, which is slower but more feature-rich. And will work with Susy2.

grunt compass Error: invalid option --sourcemap

i run grunt dev and get the error:
Running "compass:dev" (compass) task
Error: invalid option: --sourcemap
Don´t know why :(
Don´t even know how i could run compass without the option ... found nothing in the gruntfile.
thanks for help, i´m new with grunt/compass/sass
Execute "gem list" so we can have more details on what gem versions you're using.
AFAIK the sourcemap works since sass 3.3 and up.
If you want to disable the sourcemap on your project, check your config.rb file and check the sass_options entry, you might find ":sourcemap => true". If you find it, remove it and check it out.
Hope it helps!
This happens because of old version of SASS (or COMPASS, if you are using it) ruby gems which do not support sourcemap options.
Update these with following commands:
gem update sass
gem update compass <= if applicable
This should resolve the issue.

Use Bourbon SASS library with LiveReload

I'd love to use Bourbon with LiveReload but I can't seem to get them to work together. Anybody successfully made these two play nice?
If you use the 'Run a custom command after processing changes' option rather than the standard compilation option, then you can use the commands as detailed on the readme.
# Example (project root directory)
sass --watch stylesheets/sass:stylesheets -r ./stylesheets/sass/bourbon/lib/bourbon.rb
I wrote a blog post covering this.
If you install the latest version (3.0.0) of Bourbon and install bourbon into your compass sass directory:
bourbon install --path ./sass
You can then use LiveReload with one small tweak. You will need to replace LiveReload's version of SASS with at least 3.2.3, since Bourbon requires this.
Instructions on how to replace LiveReload's default SASS version can be found here: http://carl-topham.com/theblog/post/changing-version-sass-livereload/
This seems to work for me.
I've been told you can get it to work by passing the lib/bourbon.rb file into the "Run a custom command" option in LiveReload. See attached image.

Resources