Vaadin Sass Compiler "&" Issues

Hi there,

Long time no see! I hope all of you are doing fine.

I’ve been trying to migrate my original vaadin 6 Apps to Vaadin 7 and I have encountered a problem with the Saas compiler, the same as stated
here
.
When I try to nest a class inside another with a prefix, it simply doesn’t compile. I think it’s better with an example:

In sass-lang.com (http://sass-lang.com/documentation/file.SASS_REFERENCE.html#parent-selector) it states the following:
& must appear at the beginning of a compound selector, but
it can be followed by a suffix that will be added to the parent selector
. For example:

#main { color: black; &-sidebar { border: 1px solid; } } is compiled to:

#main { color: black; }
#main-sidebar { border: 1px solid; }

The problem is that, when compiled with Vaadin Sass Compiler, the output result is an error:

Compiling theme test

nov 02, 2015 12:47:07 PM com.vaadin.sass.internal.handler.SCSSErrorHandler log
GRAVE: Error when parsing file 
/Vaadin/workspace/test/WebContent/VAADIN/themes/test/test_new.scss on line 231, column 17
nov 02, 2015 12:47:07 PM com.vaadin.sass.internal.handler.SCSSErrorHandler log
GRAVE: encountered "-odd". Was expecting one of: "," "[" "%" "." ":" "{" <HASH> "." "%" <HASH> ":" "[" "," "{" 
Compilation of theme test done in 1712 ms

I’m no Sass expert but seems like a bug to me. Any clues, workaroun or future bugfix release on how to fix this?

Thank you!

Mannix

Hey Mannix,

Currently not supported, as you noticed. Don’t really know of any workarounds, but you could use "
sass --watch input.scss:output.css
" as explained here:
http://sass-lang.com/documentation/file.SASS_REFERENCE.html
.

Hi Joacim,

I don’t know how that would help…

Failed to execute goal com.vaadin:vaadin-maven-plugin:7.7.0:compile-theme (default) on project helloworld: Compiling theme “VAADIN\themes\mytheme” failed: Command [[
[ERROR]
C:\Program Files (x86)\Java\jre1.8.0_101\bin\java -classpath H:\myproject\helloworld\src\main\webapp;H:\myproject\helloworld\target\classes;H:\myproject\helloworld\src\main\java;C:\Users\Hash.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar;C:\Users\Hash.m2\repository\com\vaadin\vaadin-server\7.7.0\vaadin-server-7.7.0.jar;C:\Users\Hash.m2\repository\com\vaadin\vaadin-sass-compiler\0.9.13\vaadin-sass-compiler-0.9.13.jar;C:\Users\Hash.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\Hash.m2\repository\com\vaadin\external\flute\flute\1.3.0.gg2\flute-1.3.0.gg2.jar;C:\Users\Hash.m2\repository\com\yahoo\platform\yui\yuicompressor\2.4.8\yuicompressor-2.4.8.jar;C:\Users\Hash.m2\repository\rhino\js\1.7R2\js-1.7R2.jar;C:\Users\Hash.m2\repository\com\vaadin\vaadin-shared\7.7.0\vaadin-shared-7.7.0.jar;C:\Users\Hash.m2\repository\org\jsoup\jsoup\1.8.3\jsoup-1.8.3.jar;C:\Users\Hash.m2\repository\com\vaadin\vaadin-push\7.7.0\vaadin-push-7.7.0.jar;C:\Users\Hash.m2\repository\com\vaadin\external\atmosphere\atmosphere-runtime\2.2.9.vaadin2\atmosphere-runtime-2.2.9.vaadin2.jar;C:\Users\Hash.m2\repository\com\vaadin\external\slf4j\vaadin-slf4j-jdk14\1.6.1\vaadin-slf4j-jdk14-1.6.1.jar;C:\Users\Hash.m2\repository\com\vaadin\vaadin-client-compiled\7.7.0\vaadin-client-compiled-7.7.0.jar;C:\Users\Hash.m2\repository\com\vaadin\vaadin-themes\7.7.0\vaadin-themes-7.7.0.jar com.vaadin.sass.SassCompiler H:\myproject\helloworld\src\main\webapp\VAADIN\themes\mytheme\styles.scss H:\myproject\helloworld\src\main\webapp\VAADIN\themes\mytheme\styles.css
[ERROR]
]] failed with status 1
[ERROR]
→ [Help 1]



how to fix this error

Is now any solution ???