以下应该工作。但事实并非如此。 (CSS更改没有任何影响)出了什么问题?
@Theme("mytheme")
@Widgetset("de.datalovers.MyAppWidgetset")
public class MyUI extends UI {
@Override
protected void init(VaadinRequest vaadinRequest) {
verticalLayout = new VerticalLayout();
String s = "Montag 07:30 - 12:00"
Label label = new Label();
label.setStyleName("mystyle");
mytheme.sccs:
@import "../valo/valo.scss";
@mixin mytheme {
@include valo;
// Insert your own theme rules here
.mystyle{
color: blue;
background: yellow;
font-size: 40px;
}
}
styles.sccs
@import "mytheme.scss";
@import "addons.scss";
// This file prefixes all rules with the theme name to avoid causing conflicts with other themes.
// The actual styles should be defined in mytheme.scss
.mytheme {
@include addons;
@include mytheme;
}
最佳答案
使用CSS和Vaadin时,不要忘记清空缓存(CTRL + F5)。并在处理样式表后重新编译主题。