SASS Parser Problem with @mixin variable scope since 7.2+

hi,

we have a simple @mixin structure to use several style definitions for several themes.

styles.scss

@import "layoutStyling/foBaseOem.scss";
@import "layoutStyling/foBase.scss";

.themeFo
{
   // contains only $variable definitions/declarations with image, color, width, fonts, etc...
   @include fo-base-oem;
   // contains the full 
   @include fo-base;     
}

In 7.1.+ the style compile works fine, all variables (like $oemCostumerImage) are dissolved in the style.css output file.
In 7.2.+ the variable dissolve doesn’t work, the style.css output file contains the definition and still the variable.

Following simple test works:
styles.scss

[s]
@import "layoutStyling/foBaseOem.scss";
[/s] 
@import "layoutStyling/foBase.scss";

.themeFo
{
   // contains only $variable definitions/declarations with image, color, width, fonts, etc...
   [s]
@include fo-base-oem
[/s];
   // definie the variable directly  
   $oemCostumerImage = 'fo url';
   ...
   // contains the full 
   @include fo-base;     
}

The variables will be dissolved alsow in 7.2.+, the output style.css ist correct.
→ But this isn’t a possible doing in our project/theming structure.

thanks for some benefit

I thought i’ve found the problem, unfortunately not… :frowning:

I’ve check the actual sass 3.3. release and fix the variable scope with the new attribute

!global


The compile of our project .scss files now succeeded with the sass-lang compiler (via Ruby).

In association with the sass-compiler from actual 7.2.4 vaadin version i get unhandled error because of unknown end of line (it seem !global isn’t supported)
Exception snap…
18.07.2014 13:18:16 com.vaadin.sass.internal.handler.SCSSErrorHandler log
SCHWERWIEGEND: encountered “!”. Was expecting one of “;”, “}”,

We have similar problems… what was changed in Vaadin 7.2 regarding the sass-compiler?

The recent versions of the Vaadin Sass Compiler (especially 0.9.8/0.9.9) are now much closer to Sass 3.2 compliance. This includes dozens of changes, including scope handling which should be very close to Sass 3.2 now. The Sass 3.3 keyword !global is not yet supported, though.

You can declare the variable in the global scope before using it in a more restricted scope to make references to it in mix-ins etc. use/update the global one.

EDIT: I created
enhancement request #14350
for implementing support for !global, which could be done before more comprehensive Sass 3.3 support. Also some other minor features of Sass 3.3 are already supported.