Theme problems

Hi forum,

I have just tried following the tutorial on the custom themes, but I can’t get it working.

I added folders VAADIN/themes/marketplace to WebContent and placed styles.css inside. This file only contains a single line “@import url(…/runo/styles.css)”.

I added a line saying setTheme(“marketplace”); to my ApplicationSubclass.init().

But when I run the application, the entire window is empty. If I uncomment the line, the application shows, but the buttons are not drawn correctly.

I just upgraded to 6.0, which gave me the buttons drawing problem. So I thought this was a reasonable time to try adding a CSS file myself. But that didn’t work well so far.

Do I have to do more than described here?

I haven’t copied any files into my tree - I assume the runo theme files are picked up from the jar file. If that’s a wrong assumption, that’s probably the problem.


Monty Program AB.

Hi Bo,

I quickly tested what works in my own project and all your assumptions are correct. It should work that way.

I did however test leaving the semicolon off of the @import statement, and this causes all stylesheets to disappear, so make sure your styles.css reads

@import url(../runo/styles.css);