Skip to content

[Dev UI] Replace bespoke css vars with Material 3 surface tokens #6204

Description

@MichaelDoyle

Description

Bespoke background CSS variables (--config-options-background and --resource-attachment-background-color) are currently used across model configuration panels and message resource chips:

  • model-config-expansion-panel (used by object-input and safety-settings) uses --config-options-background (#f4f3f5 in light mode, rgb(34, 37, 42) in dark mode) for the expanded container background.
  • message.component.scss uses --resource-attachment-background-color (#f4f3f5 in light mode, rgb(34, 37, 42) in dark mode) for media/attachment preview chips inside message cards.

Instead of maintaining bespoke background tokens across :root and body[data-theme='dark'], these should be refactored to standard Material 3 surface container tokens (var(--mat-sys-surface-container)).

Affected Components & Styles

  • src/styles/_mixins.scss (model-config-expansion-panel mixin)
  • src/app/components/message/message.component.scss (.resource-attachment-container)
  • src/styles/global.scss (--config-options-background and --resource-attachment-background-color definitions)
  • src/app/components/custom-config/components/object-input/
  • src/app/components/model-config/safety-settings/

Expected Behavior / Proposed Solution

  1. Replace var(--config-options-background) in model-config-expansion-panel with var(--mat-sys-surface-container).
  2. Replace var(--resource-attachment-background-color) in message.component.scss with var(--mat-sys-surface-container).
  3. Remove both --config-options-background and --resource-attachment-background-color from src/styles/global.scss.
  4. Verify that nested input fields and resource attachment chips maintain appropriate contrast against their parent surfaces in both light and dark themes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions