The following example, straight from the SASS documentation:

@each $animal in puma, sea-slug, egret, salamander {
  .#{$animal}-icon {
    background-image: url('/images/#{$animal}.png');

Fails in 7.x-2.5, with the following error:

SassContextException: Undefined Variable: animal: sites/all/themes/sasson_test/styles/main.scss::518 Source: .#{$animal}-icon in SassContext->getVariable() (line 88 of /data/drupal7/sites/test/site/sites/all/themes/sasson/phamlp/sass/tree/SassContext.php).

Variations of the above all fail on the same point, the $var is never set from the list.

Is this a known bug in 2.x? Or should it work?


tsi’s picture

Priority:Major» Normal

it is very much possible that our phamlp can't handle @each.
Unfortunately, we don't have time to work on phamlp since most of the efforts are going into the v3.x branch which uses the original ruby-compass.
I can suggest two paths:

  • Try the new v3.x (beware, it is still in development and stuff may change)
  • Help us improving our fork of Phamlp - there are other forks that already fixed it, try to see what they did.
tsi’s picture

Component:Code» Phamlp
tsi’s picture

Issue summary:View changes
Status:Active» Closed (won't fix)

The PHP compiler used in Sasson 2.x is no longer needed in v3.x and I don't see me or anyone else getting to maintain it.
Marking all relevant issues as won't fix. sorry.
You are welcome to try the much more powerful v3.x