The Shoe Shiner
The Shoe Shiner

Reputation: 756

How to embed .css files into jar and attach via @CssImport

I'd like to create some vaadin components in a jar separate from my application. Can I use the @CssImport annotation to attach styles to these components?

Upvotes: 2

Views: 168

Answers (1)

Mikael Grankvist
Mikael Grankvist

Reputation: 521

It should work when setting them according to the Resource Cheat Sheet (v14 documentation)

The directory for the css files should be under /src/main/resources/META-INF/resources/frontend/ in the .jar project.

Upvotes: 4

Related Questions