I’m trying to use the LumoUtility class . I’m running into an issue where the utility class names are correctly added to the element, but the corresponding CSS rules are not applied.
D’oh, sorry, how I did miss that you already mentioned it?
Anyhoo, I don’t recall if the utility classes are included in the precompiled frontend bundle, so you might need to switch on hotdeploy to ensure it gets included: How to configure development mode in Vaadin
I tried setting vaadin.frontend.hotdeploy=true. Since we are using dynamically configured theme folder (instead of the @Theme annotation), we get the following error:
GET [https://localhost:9093/themes/app-theme/styles.css](https://localhost:9093/themes/app-theme/styles.css)
NS\_ERROR\_CORRUPTED\_CONTENT
The resource from “[https://localhost:9093/themes/app-theme/styles.css”](https://localhost:9093/themes/app-theme/styles.css”) was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff).
We’re assigning the theme dynamically like this, not with the @Theme annotation in the main class:
Ah, yes, the utility include in theme.json would have no effect if the theme folder is not applied with @Theme, as theme.json is not even read in that case.
Coincidentally, that problem will go away in V25, as theme.json is deprecated and the utility classes will instead be loaded as a normal css @import.