css problem

hi , i was trying to make simple css ,

i would make Label italic,

my problem is my styles.css file seems empty on firebug.

But on my war file i ve

on my java file i try this:

public void init() {

final Window window = new Window(“Vaadin Portlet Application”);


Label label = new Label(“ALL”);

window.addComponent( label );

my styles.css :
@import url(…/reindeer/styles.css);

.mystyle {
font-style: italic;
font-size: 20px;
font-weight: bolder;
line-height: normal;

After compile , i ve

But when i look firebug
seems empty and firebug says: “There are no rules. You can create a rule.”
And of course my fonts of label is not italic

Whats wrong?

Are you creating a portlet for Liferay? If so, you need to configure Liferay to find your theme. If you are using LR with bundled tomat, add your theme here:


and then put a property
in the portal-ext.properties file found under LR.

What about liferay + glassfish ?
where will i put on glassfish ?

I have not used glassfish, so someone else having experience from this area may have an answer.

Old post, but the content is still valid for Liferay 6.1.0 CE, Tomcat and Vaadin.

  • Yes, you must copy the theme contents to . .

    ( The deploy / WAR file from Eclipse does not do that part for you. )
  • I did not need to add the entry to portal-ext.properties - have removed it and things still work okay.
  • You
    import a previous base style, in fact it is preferred, e.g my test styles.css
    @import url(../liferay/styles.css); .blackBorder { border: 2px solid black; }

I got the “empty css” problem, via Firebug could see elements are styled with my new class, my custom styles.css file is loaded, but empty. (No rules, you can create a rule)

In my case it started working
somewhere between restarting the server and then removing and re-deploying the portlet
Issue is likely to be that the init section is only run on deployment and something was not triggering the refresh.
( portlet lifecycle under Liferay - google RenderRequest if you need clues)

Hope this helps someone stay sane. :slight_smile: :slight_smile:

Not sure if that is an issue here, but in case not familiar with this:

Application.init() is run when the application is (re)started. You can force an application restart using the “?restartApplication” URI parameter (make sure you place it before “#” and separate URI parameters with “&”, not “?”). Otherwise, e.g. a page reload will trigger a RenderRequest but still use the same Application instance.

EDIT: … and note that at least Chrome does very aggressive CSS caching. You may need to do multiple forced refreshes (e.g. with Ctrl-F5) for it to reload a CSS file.