Adding external CSS

Information about development with Vaadin UI.

Adding external CSS

Postby Development@SIB » Wed Jun 03, 2015 11:32 am

If you won't create your own theme or simply want to change some CSS definitions, simply add an external CSS file to your servlet configuration:

Syntax: [ Download ] [ Hide ]
<init-param>
  <param-name>externalCss</param-name>
  <param-value>../mycustomapp.css</param-value>
</init-param>

Put the mycustomapp.css into the root directory of your WebContent. It's also no problem to save the file in sub directories, e.g. ../css/mycustomapp.css but don't forget to create the folder!
User avatar
Development@SIB
 
Posts: 309
Joined: Mon Sep 28, 2009 1:54 pm

Re: Adding external CSS

Postby Development@SIB » Tue Sep 15, 2015 1:57 pm

Use

Code: Select all
jar!/package/mycustom.css

to load the custom CSS file from the classpath.
User avatar
Development@SIB
 
Posts: 309
Joined: Mon Sep 28, 2009 1:54 pm


Return to Documentation