more about how the Java code reads — a chain of LumoUtility classes tends to read cleaner to us than an inline style string built up in code
Sure, but I was thinking about things for which there is no need to use inline style strings at all, things for which there are dedicated java APIs, like VL & HL, sizing and alignment APIs, etc. Is a list of string constants better than those?
if a component sets a size that way, nobody who comes after — a theme, a dark mode, another team reusing that component — can change it with regular CSS
That is true. I suppose I just feel that applying styling this way is a recipe for disaster: you now have two different places where that style is set: one with a utility class, and another from a stylesheet somewhere. Debugging that is not fun. CSS custom properties or dedicated APIs on the component would be much less spaghetti. Light/dark can be handled cleanly with just CSS rather than overriding.
The same applies to media queries: if you use media queries it is much better for maintainability to always apply those styles through them, instead of overriding.
The pseudo-class/element case is irrelevant in this case as LumoUtility has no such classes.
All that being said, the overridability aspect is something I had not taken into account at all, so I’m glad it came up, and I will take note of it.
It’s not “no CSS allowed” — it’s specifically about the inline style=“…” attribute being blocked.
I understood that, but blocking inline styles in general will also break a lot of Vaadin features, not just sizing APIs.
(by the way, I’m fine with replies in German too
)