Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Can't load style.css?v.7.6.3
I followed this tutorial https://vaadin.com/docs/-/part/framework/themes/themes-compiling.html for compile mytheme. I choose maven, so only added the lines specified in the tutorial. I changed @Theme for "mytheme" . In this UI there is only two buttons. Unfortunalty the browser show me only the captions. With F12 on Firefox a red label warns me "stylesheet could not be loaded http://localhost:8080/VAADIN/themes/mytheme/style.css?v=7.6.3" I wrote nothing into mytheme.scss there is the default content.
Then tried another way, compiling the sass with ''mvn vaadin:compile-theme'' in the .../mytheme directory. Result: BUILD SUCCESS and style.css appears. I recompiled the code and restart the Application, but the same error is thrown. Style sheet not loaded and no buttons, only their captions (see first attachement)
Note: I use vaadin with springboot. It worked well in the past when I used vaadin-archetype-application with spring annexed.
On the second image we see that mytheme was loaded.
I browsed the forum but no topic talks about this issue.
I found an ugly way.
I compile mytheme with "mvn vaadin:compile-theme" Copy the genereted style.css on my desktop and import it manually via F12 on Firefox. The problem seems to be a name error. Maybe Vaadin creates a style.css?v=7.6.3 file and not style.css as expected.
Nevertheless does someone have a solution? Or a way to put my own style.css automatically ? Later I wil embbed a this UI in a static HTML page returned by SpringBoot. May be there is a way to specify my style.css in this static page?
On intelliJ right click on webapp -> Mark Directory As->Resources Root