Dear people,

first of all thanks for this nice theme.
Im New to SCSS but just by watching a few demos amazed me!

Since i like to use the layout-features with SCSS i wanted to include the "vertical-rhythm" extension of compass. I imported it to my subtheme's css via
@import "compass/typography";
and inside the main-theme "sasson" i added the whole typography-extension of compass in "phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/typograhy"

Then using it with

$base-font-size: 20px;
$base-line-height: 24px;
@include establish-baseline;

Fires in watchdog the following error:
SassContextException: Undefined Variable: color: /Applications/MAMP/htdocs/mysite/sites/all/themes/sasson/phamlp/sass/extensions/compass/frameworks/compass/stylesheets/compass/layout/_grid-background.scss::39 Source: $gradient: linear-gradient(bottom, $color 5%, rgba($color,0) 5%) in SassContext->getVariable() (Zeile 88 von /Applications/MAMP/htdocs/mysite/sites/all/themes/sasson/phamlp/sass/tree/SassContext.php).

Any ideas what the problem is?

Thanks and best regards,
F.

Comments

tsi’s picture

The error seems irrelevant to what you're trying to do,
The partial that throws the error is _grid-background.scss, which I guess was added by you.
You should figure out who is calling the partial and its mixins and disable it.
All in all, it might not be that easy to add compass extensions to Phamlp since it is not in sync with the current (ruby) Compass.

The 3.x branch (available for download, but still in development) of Sasson is using the original Compass via Assetic, so it should be easier to extend it.

stone_d’s picture

Thanks for the update and excuse my late reply on that.

So - i gave 3.x-branch a try but i get an assetic-error.

Assetic\Exception\FilterException: An error occurred while running: 'compass' 'compile' '/private/var/folders/O0/O0lxlbWTG9enT875l3oijk+++TI/-Tmp-' '--output-style' 'expanded' '--boring' '--images-dir' '/Applications/MAMP/htdocs/mysite/sites/all/themes/sasson/images' '--config' '/private/var/folders/O0/O0lxlbWTG9enT875l3oijk+++TI/-Tmp-/assetic_compass8GK5Bu' '--sass-dir' '' '--css-dir' '' '/private/var/folders/O0/O0lxlbWTG9enT875l3oijk+++TI/-Tmp-/assetic_compassINbG5u.scss' Error Output: /Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find sass (~> 3.1) amongst [RedCloth-4.1.1, actionmailer-2.3.5, actionmailer-2.2.2, actionmailer-1.3.6, actionpack-2.3.5, actionpack-2.2.2, actionpack-1.13.6, actionwebservice-1.2.6, activerecord-2.3.5, activerecord-2.2.2, activerecord-1.15.6, activeresource-2.3.5, activeresource-2.2.2, activesupport-2.3.5, activesupport-2.2.2, activesupport-1.4.4, acts_as_ferret-0.4.3, capistrano-2.5.2, cgi_multipart_eof_fix-2.5.0, compass-0.12.2, daemons-1.0.10, dnssd-0.6.0, fastthread-1.0.1, fcgi-0.8.7, ferret-0.11.6, gem_plugin-0.2.3, highline-1.5.0, hpricot-0.6.164, libxml-ruby-1.1.2, mongrel-1.1.5, needle-1.3.0, net-scp-1.0.1, net-sftp-2.0.1, net-sftp-1.1.1, net-ssh-2.0.4, net-ssh-1.1.4, net-ssh-gateway-1.0.0, rack-1.0.1, rails-2.3.5, rails-2.2.2, rails-1.2.6, rake-0.8.3, ruby-openid-2.1.2, ruby-yadis-0.3.4, rubygems-update-1.8.24, rubynode-0.1.5, sqlite3-ruby-1.2.4, termios-0.9.4, xmpp4r-0.4] (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems/specification.rb:777:in `activate_dependencies' from /Library/Ruby/Site/1.8/rubygems/specification.rb:766:in `each' from /Library/Ruby/Site/1.8/rubygems/specification.rb:766:in `activate_dependencies' from /Library/Ruby/Site/1.8/rubygems/specification.rb:750:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:1232:in `gem' from /usr/bin/compass:22 Input: /* ############################################# * * ##### Sasson - advanced drupal theming. ##### * * ############################################# */ $overlay-opacity: 0.5; @import "compass/css3"; @import "salsa/salsa"; @import "partials/overlay"; @import "partials/switch"; // ==== Typography. ====================================== // Custom fonts from google web fonts // ======================================================= @if false { body { font-family: false , sans-serif; } } // ==== Design Overlay. ============================================= // Overlay a draggable image over the design for visual comparison // ================================================================== @if false { body.with-overlay #overlay-image { @extend %overlay; } // Overlay toggle switch .toggle-overlay { @extend %switch; top: 90px; } } // ==== Grid Background. ========================================= // Use CSS3 gradients to creat flexible background grid "image" // =============================================================== @if false { #page.grid-background { @include salsa-background; } // Grid toggle switch .toggle-grid { @extend %switch; } } in Assetic\Exception\FilterException::fromProcess() (line 40 of /Applications/MAMP/htdocs/mysite/sites/all/themes/sasson/includes/assetic/src/Assetic/Exception/FilterException.php).

Info: Installed ruby and compass on my local-machine.

I saw you told in another post that users should be aware of not gettin thrown any assetic-errors. Mainly under Windows. But im on mac and even get that error.
Didnt find anything useful on the web regarding that error. Any ideas that could help me solving this?

Thanks in advance and regards,
F.

tsi’s picture

Version: 7.x-2.7 » 7.x-3.x-dev

The important part of this error message is only this: Could not find sass.
We don't have a lot of info about installing the v3.x branch on non-linux OSes yet. but I really want to have a documentation page on making it behave on macs and windows, as well as linux so any help here with understanding the issues is great.

By default, Sasson assumes it can run 'compass' but if that is not the case, you can do something like:
variable_set('sasson_compass_path', 'path/to/compass')
to use a different path.

This is actually shouldn't be a Sasson specific issue - it is all about making Assetic find Sass and Compass, which is much more likely to find help on the web for than an issue specific to Sasson.

Please share any new info on this, thanks.

stone_d’s picture

oke so ... my fault *haha

i THOUGHT compass is already installed but it wasnt (even i installed it - but im a noob in apache-, network- and server-stuff).
So i did a root-login and installed it. And - worked :) But vertical rhythm settings in my scss still do nothing. But maybe thats my fault in syntax or something (even i adapted it from the site).

But now i got the same problem as this guy over here. The visual-grid never shows what i set in the theme-settings, even the theme takes the correct width and stuff: http://drupal.org/node/1833762

Plus: I always get the following error in my subtheme-settings.

Warning: Creating default object from empty value in sasson_get_assets_list() (Zeile 218 von /Applications/MAMP/htdocs/mysite/sites/all/themes/sasson/includes/assets.inc).

To inform you: i got a very fresh install of drupal. So there shouldnt be any hassles with other modules.

Still any ideas? If not - thanks for your help anyway :)

Regards,
F.

tsi’s picture

cool, I'm glad that worked, any info on what happened and what you did would be awesome.
about:

The visual-grid never shows what i set in the theme-settings

Please comment on that other issue and provide any information that may be usefull (OS, compass version etc.)

Plus: I always get the following error in my subtheme-settings.

About that warning, what do you have on that line 218 ? because that file got a few changes lately, anyway you should try and see if updating to latest v3.x helps in any way.

stone_d’s picture

To solve my issue - all i did was installing compass and ruby with "gem install ..." while being logged in as root, since i got lots of read and write errors being logged in as user. Even its not the best practice it worked like a charm for me :)

On the other thing - i guess i took the lates v3.x :/

Thanks anyway and keep on sassing :D

tsi’s picture

Status: Active » Closed (works as designed)

Cleaning up, this shouldn't happen after this commit.