OpenGenerativeUI icon indicating copy to clipboard operation
OpenGenerativeUI copied to clipboard

refactor: consolidate duplicate CSS design token namespaces

Open jerelvelarde opened this issue 8 months ago • 1 comments

Description

Severity: P2 — Consistency

In apps/app/src/app/globals.css, there are duplicate design token namespaces:

  • `--text-primary` vs `--color-text-primary`
  • `--border-default` vs `--color-border`
  • `--surface-primary` vs `--color-container`

Both sets are used across different components.

Failure mode

Confusion about which token to use; risk of visual inconsistency when one set is updated but not the other.

Suggested fix

Consolidate to a single namespace. Either alias one to the other or migrate all usages to one convention.

From self-review finding F08

jerelvelarde avatar Mar 14 '26 04:03 jerelvelarde

Hi! I'd like to work on this as my first contribution. I looked at the current code, and the pairs don't all have the same answer:

  • --border-default (4 uses in 2 files) vs --color-border (46 uses)
  • --text-primary (13 uses) vs --color-text-primary (21 uses, mostly in the design system and seed templates)
  • --surface-primary (14 uses) vs --color-container (2 uses)

The values differ too, for example --text-primary is #374151 and --color-text-primary is #010507 in light mode. In dark mode --surface-primary is nearly transparent while --color-container is solid #1a1a2e, so aliasing those would visibly change the UI. --color-text-primary is also defined separately in packages/design-system.

Would a small first PR be welcome that makes --border-default an alias of --color-border, with before/after screenshots in light and dark mode? For the other two pairs, which token would you like to keep, or would you rather leave them as they are? Happy to go with whatever you prefer.

DevQuantML avatar Nov 05 '26 15:11 DevQuantML