You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify lumoImports silent deprecation in V25 upgrade guide
The lumoImports property in theme.json is silently ignored in
Vaadin 25, which can cause layouts using LumoUtility CSS classes
to appear broken without any error or warning. The CSS class names
are still added to the DOM but have no backing stylesheet.
Add an IMPORTANT callout near the theme.json deprecation note to
warn about this, and expand the Lumo Theme section to clarify that
@theme does not load utility classes and that applications
migrating from V24 with lumoImports in theme.json must add
@Stylesheet(Lumo.UTILITY_STYLESHEET).
Copy file name to clipboardExpand all lines: articles/upgrading/index.adoc
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,6 +276,11 @@ public class Application implements AppShellConfigurator {}
276
276
277
277
The [filename]`theme.json` configuration file is deprecated (but still supported in the `frontend/themes/<mytheme>/` folder, except for the `lumoImports` property).
278
278
279
+
[IMPORTANT]
280
+
====
281
+
The `lumoImports` property in [filename]`theme.json` is silently ignored in Vaadin 25. If your application relied on `lumoImports` to load utility classes (e.g., `"lumoImports": ["utility"]`), views using [classname]`LumoUtility` CSS classes for layout (flex, grid, gap, padding, etc.) will render with broken layouts. The class names are still added to the DOM but have no backing CSS rules. See <<lumo-theme>> for instructions on loading the Lumo Utility stylesheet.
282
+
====
283
+
279
284
The `themeFor` parameter of the [classname]`@CssImport` annotation (for shadow-DOM injection) is deprecated (but still supported).
280
285
281
286
The special [filename]`document.css` file (for loading styles into the document root in embedded components) is removed as no longer necessary.
@@ -318,6 +323,7 @@ public SecurityFilterChain vaadinSecurityFilterChain(HttpSecurity http) throws E
318
323
}
319
324
----
320
325
326
+
[[lumo-theme]]
321
327
=== Lumo Theme
322
328
323
329
The Lumo theme is no longer loaded by default, except if you’re using the [classname]`@Theme` annotation to load an application theme folder. If you’re not using [classname]`@Theme`, then add a [classname]`@StyleSheet` annotation to either your application class or a root layout to load the Lumo theme:
@@ -328,15 +334,19 @@ The Lumo theme is no longer loaded by default, except if you’re using the [cla
328
334
public class Application implements AppShellConfigurator {}
329
335
----
330
336
331
-
All Lumo styles, including badges, but excluding Lumo Utility Classes are included by default when the Lumo theme is loaded. To load the utility classes, add a separate [classname]`@StyleSheet` annotation:
337
+
All Lumo styles, including badges, but excluding Lumo Utility Classes are included by default when the Lumo theme is loaded. This applies regardless of whether the theme is loaded through [classname]`@Theme` or [classname]`@StyleSheet`. To load the utility classes, add a [classname]`@StyleSheet` annotation:
332
338
333
339
[source,java]
334
340
----
335
-
@StyleSheet(Lumo.STYLESHEET)
336
341
@StyleSheet(Lumo.UTILITY_STYLESHEET)
337
342
public class Application implements AppShellConfigurator {}
338
343
----
339
344
345
+
[NOTE]
346
+
====
347
+
If your Vaadin 24 application used `"lumoImports": ["utility"]` in [filename]`theme.json` to load the Lumo Utility Classes, you must add `@StyleSheet(Lumo.UTILITY_STYLESHEET)` when upgrading to Vaadin 25. The [classname]`@Theme` annotation does not load utility classes, and the `lumoImports` property in [filename]`theme.json` is no longer supported. Without this change, any layout built with [classname]`LumoUtility` constants (such as `Display.FLEX`, `FlexDirection.COLUMN`, `Gap.MEDIUM`, etc.) will appear broken, as the CSS class names are present in the HTML but have no associated styles.
348
+
====
349
+
340
350
The Lumo icon collection is not loaded by default anymore, except if you’re using the [classname]`@Theme` annotation to load an application theme folder. To ensure Lumo icons are included in your application bundle, use the [classname]`LumoIcon` enum instead of the general [classname]`Icon` class:
0 commit comments