[opencms-dev] Add custom Vaadin styles for custom OpenCms11+ apps

Sandrine Prousteau s.prousteau at eurelis.com
Thu Sep 19 12:00:38 CEST 2019


I found a way on my own ...

Added an annotation on my custom Component class :
@StyleSheet("myfile.css")
public class CmsSiteManagementView extends VerticalLayout {

The file is placed in the same package of this class.
It contains my css :
e-color-red{color:red}

In my component, I use
mylabel.addStyleName("e-color-red");

Build the lib with the *.css in it, import, restart OpenCms, test my app,
it's red!


Le jeu. 19 sept. 2019 à 11:25, Sandrine Prousteau <s.prousteau at eurelis.com>
a écrit :

> Hi all
>
> Is there a way to add custom css styles to the vaadin theme on OpenCms11+ ?
> I'd like for example display some Label objects in red or green... I
> didn't find any in the OpenCmsTheme.
>
> It should be great to publish a styleguide of this OpenCmsTheme.
>
> Sandrine
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20190919/dc92ea79/attachment.htm>


More information about the opencms-dev mailing list