Flow: Create theme class for Lumo

Created on 21 Dec 2017  路  8Comments  路  Source: vaadin/flow

Create a class Lumo extends AbstractTheme that can be
used for enabling use of Lumo theme.
Note! there should be no dependecy from flow to vaadin-lumo-styles (vaadin-lumo-theme) webjar

external dependency tutorial

All 8 comments

Note! there should be no dependecy from flow to vaadin-valo-styles (vaadin-valo-theme) webjar

Why not? I think the theme should import and include the shared style modules that affect the whole page (typography and colors).

Vanilla Flow should be decoupled from our web component implementations. Valo only makes sense when also using our elements, and it should therefore be defined as a dependency for each of the component API modules instead of being required directly by Flow.

Then maybe Valo extends AbstractTheme should be in its own flow-theme-valo module?

Vanilla Flow should be decoupled from our web component implementations.

Not necessarily true. An app could just want to use the shared styles, like fonts and colors defined in the main Valo package, without actually using any of our elements. A developer could be building all elements by themselves, but still use the shared styles from Valo.

@jouni In that special case, I think it's best that the developer explicitly adds the required dependency instead of we automatically always putting it there.

I agree with @Legioth and @jouni both: from my perspective, shared styles should be usable independently from the elements, but not included by default in Flow. I would then depend on:

  • no use of Valo at all: no dependencies
  • use of Valo shared styles: flow-theme-valo (or whatever 馃槃)
  • use of Valo shared styles and e.g. Button: flow-theme-valo, vaadin-button-flow

Not sure with what is the use case for just importing the shared styles, but as mentioned by Leif, the developers can do that manually. Thus this will just affect the component imports.

Acceptance Criteria

  • There is documentation about how Lumo can be the used in your app
  • All the starters should be updated to use Lumo theme by default. This will have to wait for a platform release, but the PRs can be made

PRs for starters have been made, closing this for now.

Was this page helpful?
0 / 5 - 0 ratings