Skip to content

style: update color variable definitions - #30

Merged
Chrisliao0806 merged 1 commit into
release/26P3_devfrom
feature/fix_style
Aug 13, 2026
Merged

Chrisliao0806 merged 1 commit into
release/26P3_devfrom
feature/fix_style

Conversation

@Chrisliao0806

Copy link
Copy Markdown
Collaborator

Description

Context

After rebasing release/26P3_dev onto main, the entire PwC brand color scheme appeared "dead" across the app — primary buttons, switches, sliders, progress bars, focus rings, and the chat submit button all lost their orange accent and rendered transparent/colorless.

Root cause

The upstream rebase window included a color-system overhaul (LibreChat-AI#14670, LibreChat-AI#14709, LibreChat-AI#14734) that migrated all theme CSS variables to bare R G B channel triplets, consumed as rgb(var(--x) / <alpha-value>).

Our PwC theming commits were replayed correctly during the rebase, and every consumer was migrated to the new convention:

  • client/tailwind.config.cjs — 'brand-primary': 'rgb(var(--brand-primary) / <alpha-value>)'
  • client/src/style.css — .btn-primary { background-color: rgb(var(--brand-primary)); }
  • client/src/style.css — --surface-submit: var(--brand-primary); (both html and .dark blocks)

However, the variable definitions were left in the old pre-rebase format as complete HSL color values:

--brand-primary: hsl(var(--brand-primary-hsl));

Every consumer therefore resolved to rgb(hsl(18 98% 51%) / 1) — invalid CSS that browsers silently drop, which killed the brand accent everywhere at once.

Change

Single fix in client/src/style.css: redefine the --brand-primary trio as RGB triplets sourced from the PwC palette, matching the new system-wide convention.

--brand-primary: var(--pwc-orange-500);        /* 253 81 8  — #fd5108 */
--brand-primary-hover: var(--pwc-orange-600);  /* 224 71 5  — #e04705 */
--brand-primary-subtle: var(--pwc-orange-100); /* 255 236 189 — #ffecbd */

The --brand-primary-*-hsl channel variables are kept, as the shadcn --ring token still consumes them via hsl(var(--ring)).

Also audited during investigation (no further changes needed):

  • The 13 component-level hunks dropped during the rebase replay (e.g. TwoFactorScreen, MCPConfigDialog, Fork, SkillToggle — originally bg-green-* → bg-brand-primary) are obsolete: upstream refactored those components onto semantic tokens (accent-primary, ring-primary, surface-submit), which already map to the PwC palette.
  • pwc-orange-* utilities, dark-mode overrides, and client/index.html are all intact and consistent with the triplet convention.

Tests

  • Compiled the client Tailwind CSS with the real config (npx tailwindcss -c tailwind.config.cjs -i src/style.css -o out.css) and verified the generated rules now form a valid chain:
    • .bg-brand-primary → background-color: rgb(var(--brand-primary) / var(--tw-bg-opacity))
    • --brand-primary: var(--pwc-orange-500) → resolves to rgb(253 81 8 / 1) (PwC orange)
    • alpha modifiers work again, e.g. .bg-brand-primary/20 → rgb(var(--brand-primary) / 0.2)
  • Verified no remaining consumer expects --brand-primary as a complete color value (grep for non-rgb()-wrapped usages across client/src and packages/client/src).
  • Visual check in the running app: primary/confirm buttons, switch checked state, slider, progress bar, chat submit button, and focus rings render in PwC orange again in both light and dark mode.

Instruction and/or command lines to reproduce your tests:

# CSS-only change — no package rebuild required
npm run frontend:dev   # HMR picks it up; or `cd client && npm run build` for the 3080 build

Then open the app and confirm the PwC orange accent on: login/confirm buttons, switches, sliders, progress bars, and the chat send button (light + dark mode).

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run one-shot tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

@Chrisliao0806
Chrisliao0806 merged commit b731f92 into release/26P3_dev Aug 13, 2026
4 checks passed
@Chrisliao0806
Chrisliao0806 deleted the feature/fix_style branch August 13, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant