Skip to content

Lumo should just load stylesheets in V25 #21605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #7691
rolfsmeds opened this issue Jun 3, 2025 · 0 comments
Open
Tracked by #7691

Lumo should just load stylesheets in V25 #21605

rolfsmeds opened this issue Jun 3, 2025 · 0 comments

Comments

@rolfsmeds
Copy link

rolfsmeds commented Jun 3, 2025

Describe your motivation

Currently, applying a theme (in practice Lumo or Material) rewrites components' JSModule paths to the theme-specific module.

As of V25, Material is removed, and the Lumo styles for components are no longer loaded as part of the component dependencies but as regular stylesheets loaded separately from the components themselves: @CssImport("@vaadin/vaadin-lumo-styles/lumo.css") or, in css, @import("@vaadin/vaadin-lumo-styles/lumo.css").

The @Theme annotation is retained for backward compatibility, but only as a shorthand for loading the Lumo stylesheet, and, if specified, the application theme.

Describe the solution you'd like

  • @Theme(themeClass=Lumo.class) should just do a @CssImport("@vaadin/vaadin-lumo-styles/lumo.css")
  • @Theme("mytheme") should do the import and then load the specified folder's styles.css
  • @Theme(themeClass=Lumo.class, variant=Lumo.DARK) should do the import and apply the theme="dark" to the page (as it does today).

Perhaps this could be implemented simply by a @CssImport in the Lumo theme class, instead of the current lumo-styles npm package import?

Additionally, the Lumo theme class should no longer load various JSModules as these will no longer exist.

@mshabarov mshabarov added the v25 label Jun 3, 2025
@rolfsmeds rolfsmeds changed the title @Theme should just load stylesheets in V25 Lumo should just load stylesheets in V25 Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants