Skip to content

[RFC] Core v0.9 styling#1057

Open
ditman wants to merge 3 commits intogoogle:mainfrom
ditman:core-styling
Open

[RFC] Core v0.9 styling#1057
ditman wants to merge 3 commits intogoogle:mainfrom
ditman:core-styling

Conversation

@ditman
Copy link
Copy Markdown
Collaborator

@ditman ditman commented Apr 2, 2026

Description

This is some initial work for the CSS styling of the v0.9 of the renderers. On this version, only the "Button" component is styled.

The idea is to give global CSS variables that users can control in a more or less granular fashion, and some widget-defined variables.

The only widget I've really touched so far is the Lit Button, as a PoC. It is eyeball tested in the v0.9 gallery sample app for now.

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a default theme system for A2UI, including a new theme injection utility and CSS variable definitions. The Button and Text components across the basic and minimal catalogs have been updated to utilize these styles. Feedback points out a critical SSR compatibility issue where the document object is accessed without a check, an inconsistent fallback color for button hovers, and significant code duplication between catalogs that should be refactored into shared utilities or base classes.

@ditman ditman force-pushed the core-styling branch 2 times, most recently from cd49d59 to 1ec1849 Compare April 7, 2026 21:01
Copy link
Copy Markdown
Collaborator

@jacobsimionato jacobsimionato left a comment

Choose a reason for hiding this comment

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

LGTM other than this one comment

@ditman ditman force-pushed the core-styling branch 2 times, most recently from c975b99 to 0ad9206 Compare April 8, 2026 17:45
ditman added 3 commits April 9, 2026 10:08
The function allows basic catalog implementations to inject a shared
stylesheet that contains a set of overridable variables used by the
widgets to keep the styling somewhat consistent.
@ditman
Copy link
Copy Markdown
Collaborator Author

ditman commented Apr 9, 2026

PTAL @ava-cassiopeia @jacobsimionato (if you go down the PR chain you can see how this ends up being used!)

}

:where(:root), :where(.a2ui-dark), :where(.a2ui-light) {
--a2ui-color-background: light-dark(#eee, #111);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Happy with this as a start, but let's figure out how to honor primaryColor in the agent-provided surface theme also.

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants