Theme for a subwindow


I want to have two different themes, one for mainwindow and another for a window added to mainwindow.

Is it possible?

I tried but the second theme is ignored…

Thank u!

If you tried Window.setTheme(String) for a sub-window (window within the main window), you’re out of luck. That will be ignored. The API is the same for both window types for historical reasons and backward compatibility (but this will be fixed in version 7).

If you need different themes for sub-windows, you can use the same theme CSS as with the main window theme, but prefix all selectors that should be for the sub-windows with
, so they will only affect components that reside inside sub-windows.

Per-window themes might be handy sometimes, but IMO rarely needed. They could slim down the initial theme download a bit, since not all styles would be loaded straight away but only when a sub-window with a different theme is opened.

This might be worth an enhancement ticket. Would you be so kind and post one to our
? Thanks!

you can put the two Theme in this case,

  • New directory Theme: runo-liferay
    setTheme (“runo-liferay”);

  • Create the style.css file in the new directory liferay-runo. and you add
    @ import url (… / liferay / styles.css);
    @ import url (… / runo / styles.css);

I think it will be util