我很难将 Vaadin 电子表格的 css(更具体地说是 scss)包含在我的项目主题中。
我是否像这样将它添加到styles.scss?
@import "../valo/valo.scss";
.wastecentertheme {
@include valo;
}
@mixin addons {
@include spreadsheet;
}
或者是这样的?
@import "../valo/valo.scss";
.wastecentertheme {
@include valo;
@mixin addons {
@include spreadsheet;
}
}
前者编译但输出 .css 似乎没有任何必需的规则。第二个打破这个消息......
[INFO] --- vaadin-maven-plugin:8.1.1:compile-theme (default) @ portal ---
[INFO] Updating theme VAADIN/themes/base
[INFO] Theme "VAADIN/themes/base" compiled
[INFO] Updating theme VAADIN/themes/valo
[INFO] Theme "VAADIN/themes/valo" compiled
[INFO] Updating theme VAADIN/themes/wastecentertheme
[ERROR] Aug 09, 2017 1:36:31 AM com.vaadin.sass.internal.handler.SCSSErrorHandler log
[ERROR] SEVERE: Error when parsing file
[ERROR] /usr/local/code/Waste Center/src/main/webapp/VAADIN/themes/wastecentertheme/styles.scss on line 4, column 17
[ERROR] Aug 09, 2017 1:36:31 AM com.vaadin.sass.internal.handler.SCSSErrorHandler log
[ERROR] SEVERE: encountered "@mixin". Was expecting one of: "}" "+" "-" ";" ">" "~" "[" "*" "%" "&" "." "and" "or" "not" ":" "#{" "through" "in" "@include" "@debug" "@warn" "@for" "@each" "@while" "@if" "@extend" "@content" <MICROSOFT_RULE> <IDENT> <VARIABLE> <HASH> "@import" "@media" <KEY_FRAME_SYM> <ATKEYWORD>
[ERROR] org.w3c.css.sac.CSSParseException: encountered "@mixin". Was expecting one of: "}" "+" "-" ";" ">" "~" "[" "*" "%" "&" "." "and" "or" "not" ":" "#{" "through" "in" "@include" "@debug" "@warn" "@for" "@each" "@while" "@if" "@extend" "@content" <MICROSOFT_RULE> <IDENT> <VARIABLE> <HASH> "@import" "@media" <KEY_FRAME_SYM> <ATKEYWORD>
[ERROR] at com.vaadin.sass.internal.parser.Parser.reportError(Parser.java:418)
[ERROR] at com.vaadin.sass.internal.parser.Parser.styleRule(Parser.java:2203)
[ERROR] at com.vaadin.sass.internal.parser.Parser.topLevelDeclaration(Parser.java:591)
[ERROR] at com.vaadin.sass.internal.parser.Parser.parserUnit(Parser.java:487)
[ERROR] at com.vaadin.sass.internal.parser.Parser.parseStyleSheet(Parser.java:122)
[ERROR] at com.vaadin.sass.internal.ScssStylesheet.get(ScssStylesheet.java:172)
[ERROR] at com.vaadin.sass.SassCompiler.main(SassCompiler.java:92)
[ERROR]
[ERROR] Aug 09, 2017 1:36:31 AM com.vaadin.sass.internal.handler.SCSSErrorHandler warn
[ERROR] WARNING: Warning when parsing file
[ERROR] /usr/local/code/Waste Center/src/main/webapp/VAADIN/themes/wastecentertheme/styles.scss on line 8, column 4
[ERROR] Aug 09, 2017 1:36:31 AM com.vaadin.sass.internal.handler.SCSSErrorHandler warn
[ERROR] WARNING: Skipping: }
[ERROR] org.w3c.css.sac.CSSParseException: Skipping: }
[ERROR] at com.vaadin.sass.internal.parser.Parser.reportWarningSkipText(Parser.java:434)
[ERROR] at com.vaadin.sass.internal.parser.Parser.topLevelDeclaration(Parser.java:618)
[ERROR] at com.vaadin.sass.internal.parser.Parser.parserUnit(Parser.java:487)
[ERROR] at com.vaadin.sass.internal.parser.Parser.parseStyleSheet(Parser.java:122)
[ERROR] at com.vaadin.sass.internal.ScssStylesheet.get(ScssStylesheet.java:172)
[ERROR] at com.vaadin.sass.SassCompiler.main(SassCompiler.java:92)
[ERROR]
[ERROR] Compiling theme "VAADIN/themes/wastecentertheme" failed
有任何想法吗?也许我需要从 Vaadin-Spreadsheet 的 .jar maven 导入中获取 .scss 并将其副本放在我的目录中并执行 @import 吗?