The VAADIN SASS compiler doesn’t give you very much information about errors. If - see the following example - your *.scss file contains css-errors, you get no information about that.
my_theme.scss:
@mixin test-mixin($font-size : 3) {
font-family: Arial;
font-size: $font-size;
}
.main {
@include test-mixin;
}
compiles to my_theme.css:
.main {
font-family: Arial;
font-size: 3;
}
In case you use invalid property names - for example ’
fontsize
’ instead of ’
font-size
’ - this is also ok for the SASS compiler.
If a severe error occurs during parsing the scss-file and the compiler can’t continue, you get (within eclipse) only a console message, which informs you, that the compilation was not successfull; see the following changed example:
my_theme.scss:
[code]
@mixin test-mixin($font-size : 3,5) {
font-family: Arial;
font-size: $font-size;
}
.main {
@include test-mixin;
}
[/code]Within the eclipse console you get the very impressive message:
[code]
Compiling theme my_scss
Compiling theme my_scss failed after 892 ms
[/code]I have tried to compile this scss-file without the VAADIN eclipse plugin (see GitHub for the VAADIN SASS compiler project). I got a message about the error, which shows the line and column where the error has been detected:
[code]
Exception in thread “main” com.vaadin.sass.internal.parser.SCSSParseException: Error when parsing file xxxx\my_scss.scss
Encountered “5” at line 1, column 34.
Was expecting one of:
…
…
at com.vaadin.sass.internal.ScssStylesheet.get(ScssStylesheet.java:176)
at com.vaadin.sass.SassCompiler.main(SassCompiler.java:92)
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [util.c:840]
[/code]Of course no css-file was generated (as with the VAADIN eclipse plugin).
Thanks el goog