I have @Theme("mytheme") attached to my UI; yet Touchkit completely ignores my custom styles.css file with just a simple content:
.v-label-label-ellipsize {
background: blue !important;
}
If I forcibly add the theme with
getPage().getStyles().add(".v-label-label-ellipsize { background: blue !important; }");
It starts to work.
I have tried getPage().getStyles().add(new ThemeResource("styles.css"));
and here is the source of the problem: this gets added to the html's head section:
So it is clear that Touchkit ignores the @Theme setting and always use the touchkit theme.
I tried a workaround which worked: getPage().getStyles().add(new ClassResource("styles.css"));
I'm using Touchkit 4.0.4
Originally by mvysny2
I have @Theme("mytheme") attached to my UI; yet Touchkit completely ignores my custom styles.css file with just a simple content: .v-label-label-ellipsize { background: blue !important; }
If I forcibly add the theme with getPage().getStyles().add(".v-label-label-ellipsize { background: blue !important; }"); It starts to work. I have tried getPage().getStyles().add(new ThemeResource("styles.css")); and here is the source of the problem: this gets added to the html's head section:
So it is clear that Touchkit ignores the @Theme setting and always use the touchkit theme. I tried a workaround which worked: getPage().getStyles().add(new ClassResource("styles.css")); I'm using Touchkit 4.0.4
Imported from https://dev.vaadin.com/ issue #19369