0

I have an HTML file, which serves as a template for my Vaadin view.

This HTML file uses several styles from a custom CSS file, let's call it custom.css.

Imagine I create a CustomLayout instance a from that file. I want a to use styles from custom.css only and ignore the theme styles.

How can I do that?

Notes:

  1. I know that I can create my own themes etc., but in practice this is not useful since styling the theme via a myriad of styles is too cumbersome. Instead, I want that the UI designer creates the view template in Dreamweaver (or similar tool) and then I integrate that view into the Vaadin application.

  2. I know about CustomLayout.addStyleName(...), but I don't want to add the styles manually.

Glory to Russia
  • 17,289
  • 56
  • 182
  • 325

1 Answers1

2

Take a look at the @com.vaadin.annotations.StyleSheet annotation. It makes possible to load css files from classpath or external urls.

Henri Kerola
  • 4,947
  • 1
  • 17
  • 19