KEMBAR78
feat: Aura color scheme by jouni · Pull Request #10143 · vaadin/web-components · GitHub
Skip to content

Conversation

@jouni
Copy link
Member

@jouni jouni commented Sep 9, 2025

Depends on #10142

Global properties and setup for colors, typography, and sizing.
@jouni jouni force-pushed the feat/aura-color-scheme branch from 8cbd805 to dc5c992 Compare September 9, 2025 12:01
@@ -0,0 +1,45 @@
:where(html) {
--aura-red: light-dark(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question: why did you specify --aura-red instead of --vaadin-red?

My assumption would have been like this: I can re-use those variables inside my theme that extends aura - meaning I would always have to remember that they are named --aura instead of --vaadin like everything else. This also comes with the problem that I can't switch e.g. between aura and another theme you create in the future, which might use --lorem? (I know there is --lumo.. but this feels like a deprecated thing.. or?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only/main reason because these properties are defined by the Aura theme.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I wonder if there’s any benefit in having separate prefixes in different themes? Maybe all themes should just use --vaadin? I mean, you’re never supposed to use/extend more than one theme at a time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would leave the existing Lumo properties in a weird place, though.

Copy link
Contributor

@knoobie knoobie Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lumo is "deprecated" anyway, or? I would vote for --vaadin, but that's up for you and the others to decide :) from a user's perspective it feels "better" to only remember --vaadin regardless of which theme we use

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lumo isn't entirely deprecated. The shadow DOM implementation is. We are planning on refactoring/rewriting it in 25 minors from shadow DOM styles to light DOM. That could be a place where we rename the properties as well.

I agree, it would be nice to have just a single namespace for these. Somehow it just feels academically correct to have a theme-specific prefix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the problem is also that if we had theme-specific properties called --vaadin-something, that are available in Aura but not in Lumo, you'd have to know/remember/lookup which are available in which theme.

Copy link
Contributor

@knoobie knoobie Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might sound stupid.. but with "AI rising" it probably might even be good for those nifty LLMs that all properties (independently from the used theme) use the same prefix.. not just for humans / developer 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it’s mostly about the palette, perhaps we can consider moving those to base styles eventually. Or did you already consider some other Aura-specific properties, which you’d want to use in another theme?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not looked into all properties in detail, my gut feeling would be: all public properties should be prefixed with vaadin. all "internal" properties should be either aura or something else

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 9, 2025

@jouni jouni requested review from vursen and web-padawan September 10, 2025 05:23
@web-padawan web-padawan removed the request for review from vursen September 12, 2025 11:09
@web-padawan web-padawan merged commit 9720a00 into main Sep 12, 2025
9 checks passed
@web-padawan web-padawan deleted the feat/aura-color-scheme branch September 12, 2025 11:09
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-alpha10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants