Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin Sass Compiler "&" Issues

Mannix Manglani Mankani
7 years ago Nov 02, 2015 1:19pm

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!



Joacim Päivärinne
7 years ago Jan 15, 2016 3:43pm
Mannix Manglani Mankani
6 years ago Aug 01, 2016 8:32pm
Hashan Madusanka Perera
6 years ago Sep 12, 2016 1:40pm
Matthias Heinel
6 years ago Jan 06, 2017 1:01pm