vaadin / portlet

Portlet support for Vaadin Flow
https://vaadin.com
Other
2 stars 3 forks source link

Theming each portlet seperatly #235

Open krissvaa opened 2 years ago

krissvaa commented 2 years ago

For now, there are 2 workarounds to theme each portlet but there should be a more straightforward way. Option 1: to add a united custom theme and use portlet id as css selector in themes stylesheet. Option 2: ls to there is to wrap the portlet main view as a custom component with ThemableMixin and add a custom stylesheet to this component.

For now, I see two ways of adding this feature: 1)Having the option to add different themes for each portlet. This approach doesn't work now as there is Vaadin restriction - only one theme is allowed for application (static-bundle). There could be extra work needed after lifting the restriction, but that needs to be investigated.

2)Adding option to use @CssImport annotation directly on portlet class that extends VaadinPortlet. Probably that means to extend ThemableMixin for the portlet component underneath.