Skip to content

Design system 3/4: Paint the existing UI with the design system's colour tokens - #5767

Draft
awwaiid wants to merge 1 commit into
design-system/02-load-alongside-bootstrapfrom
design-system/03-tokens-on-legacy-ui
Draft

awwaiid wants to merge 1 commit into
design-system/02-load-alongside-bootstrapfrom
design-system/03-tokens-on-legacy-ui

Conversation

@awwaiid

@awwaiid awwaiid commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #5764. Stacked draft PR 3 of 4, based on PR 2. Plan: docs/design-system-slicing-plan.md on the design branch

Stack (review and merge in order; each PR shows only its own diff):

  1. Design system 1/4: Add the Tailwind toolchain and tokens (not yet loaded) #5765 Toolchain and tokens (no visible change)
  2. Design system 2/4: Load the design system stylesheet alongside Bootstrap #5766 Load alongside Bootstrap (no visible change)
  3. Design system 3/4: Paint the existing UI with the design system's colour tokens #5767 Colour tokens on the existing UI 👈 this PR
  4. Design system 4/4: Switch the typeface to Figtree #5768 Figtree typeface + date-picker spec fix

Description

The first PR anyone will see. Bootstrap/AdminLTE's primary blue becomes the design system's indigo brand, and the page background and body text move to its slate neutrals. No markup changes, and nothing moves. All 25 screenshotted pages keep their exact dimensions.

The whole change is app/assets/tailwind/legacy/bootstrap_bridge.css. Its rule is "swap values, keep shapes": only colours change, never size, spacing, radius or layout. It is temporary. Each later PR that replaces a legacy component with the design system's own deletes that component's section, and the file goes when Bootstrap does.

The file is organised by concept: neutrals, links, primary buttons, selected state (sidebar, pills, pagination, dropdowns, select2), focus, and brand surfaces. Each selector is copied from the legacy rule it overrides. Specificity therefore ties, and the later stylesheet wins.

I measured coverage in the browser instead of guessing. Before this PR, 35 kinds of element rendered in primary blue across the 25 pages. After it, one is left on purpose: AdminLTE's bg-blue info box on the admin dashboard. That is a categorical colour (it sits next to bg-red and bg-green), not the brand colour.

The typeface is deliberately left for PR 4, because it reflows text.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • A Playwright pixel diff of 25 pages: every page keeps its dimensions.
  • An in-browser probe that lists every element whose computed colour is still Bootstrap's primary blue.
  • bundle exec rspec spec/assets/design_system_build_spec.rb. The collision guard now exempts the bridge, the one file whose job is to target legacy classes.

Screenshots

Before/after screenshots are available on request. Running the branch locally is the quickest way to see it.


🤖 Generated with Claude Code

https://claude.ai/code/session_01UCzWYw6Gq5YdmU4MaiGnQa

Third slice of #5764, and the first one anyone will see: Bootstrap and
AdminLTE's primary blue becomes the design system's indigo brand, and the
page canvas and body text move to its slate neutrals. No markup changes.

app/assets/tailwind/legacy/bootstrap_bridge.css is the whole change. Its
rule is "swap values, keep shapes": only colours change, never size,
spacing, radius, typeface or layout. All 25 screenshotted pages keep their
exact dimensions. The file is temporary by design: each later slice that
replaces a legacy component with the design system's own deletes that
component's section, and the file leaves with Bootstrap.

Sections, by concept: neutrals, links, primary buttons, selected/current
state (sidebar, pills, pagination, dropdowns, select2), focus, and brand
surfaces (card-primary, bg/text/border-primary, badges, progress,
checked controls). Selectors are copied from the legacy rules they
override, so specificity ties and the later stylesheet wins.

Coverage was measured in the browser rather than guessed. Before this
change, 35 distinct kinds of rendered element (69 element/property pairs)
painted primary blue across the 25 pages. After, one is left on purpose: AdminLTE's `bg-blue` info-box on
the admin dashboard, a categorical colour next to bg-red and bg-green, not
the brand.

The collision guard now exempts the bridge, the one file whose job is to
target legacy classes.

The typeface is deliberately not in this slice. It reflows text, so it
gets its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzWYw6Gq5YdmU4MaiGnQa

This branch has not been deployed

No deployments
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