Time for action – creating a new Vaadin theme
Follow these steps to create a new Vaadin theme:
- Open the themes example application on your IDE.
- Create a new
VAADIN/themes/cool/
folder besides your WEB-INF folder: - Create a new file
styles.scss
in the newly created directory and let your fingers type this into the new file:@import "cool.scss"; .cool { @include cool; }
- Create a new file
cool.scss
in the newly created directory and allow your fingers to type this into the new file:@import "../chameleon/chameleon.scss"; @mixin cool { @include chameleon; }
- Use the theme in
ThemesUI
:@Theme("cool") public class ThemesUI extends UI { // ... }
- Run the application ...
Get Vaadin 7 UI Design By Example Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.