Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Cannot make mobile app use styles.css
I create a label for a mobile app using TouchKit, and am trying to use CSS to style it.
I put @Theme("wedding") with the other annotations at the top of the class that extends UI.
I use labelName.setStyle("boldCentered")
I put styles.css into src/main/webapp/VAADIN/themes/wedding/
in styles.css, I put
When I run the app, the label is neither bold nor centered.
By using "inspect" on Chrome, I can see that v-label-boldCentered is one of the styles for one of the div sections containing my label, but on the far right-hand-side, I cannot find that it is one of the styles containing attributes to apply to the text.
So it seems that there is something I am not doing or doing wrong that prevents the TouchKit runtime from picking up my style. Can anyone point me to a place to look, or something else to try?
I suppose I should have also said that I'm writing the app on eclipse with the Vaadin plugin, using Maven to build and so forth, and running on Apache/Tomcat
Just to make sure that it is not just a typo, You are aware that you in the labelName.setStyle are writing centeredBold and in the css writes boldCentered? You are putting the words the other way around.
You scared me. Yes, both the Java and the css files have "boldCentered", but you sure made me check. And they both have "C" capitalized, also. A good thing to check... I've now updated the post to have it the right way 'round, as it already is in the code.