Skip to content

refactor(ui): use design tokens instead of hardcoded colors on new lo…#14998

Open
ksitton58 wants to merge 1 commit into
DefectDojo:devfrom
ksitton58:fix/login-page-semantic-color-tokens
Open

refactor(ui): use design tokens instead of hardcoded colors on new lo…#14998
ksitton58 wants to merge 1 commit into
DefectDojo:devfrom
ksitton58:fix/login-page-semantic-color-tokens

Conversation

@ksitton58

Copy link
Copy Markdown

Description

The new Tailwind login page (dojo/templates/dojo/login.html) hardcoded hex
color values that exactly duplicate the design tokens defined in
components/tailwind.css (@theme). This swaps them for the corresponding
var(--color-*) tokens so the login page stays in sync with the design system
if the palette ever changes, instead of silently drifting.

The compiled token values are byte-identical to the hex they replace, so there
is no visual change:

Was Now
#e8f3fb, #f7f8f9, #fff (gradient) --color-dd-primary-50, --color-surface-2, --color-surface
#191919 / #666666 --color-text / --color-text-muted
#DCDCDC --color-border
#1779C5 / #204D87 --color-dd-primary-500 / --color-dd-primary-700

#333333 (control label) and the alpha-channel rgba() shadows are left as-is
since they have no exact token equivalent.

Test results

Ran the new UI locally (docker dev stack) and loaded /login. Verified the
page renders identically and that each token resolves to the exact RGB of the
hex it replaced (e.g. Login button computes rgb(23,121,197) = #1779C5,
title rgb(25,25,25) = #191919, input border rgb(220,220,220) = #DCDCDC).
No functional/Python changes, so no unit tests added.

Documentation

N/A — no behavior or documented feature changes.

Checklist

  • Submitted against dev (this is a change, not a bugfix).
  • Meaningful PR name.
  • Ruff compliant (no Python changed).
  • Python 3.13 compliant (no Python changed).
  • New feature docs — N/A.
  • Model migrations — N/A.
  • Unit tests — N/A (template-only, no behavior change).

@mtesauro

Copy link
Copy Markdown
Contributor

Re-kicking that one test...

@mtesauro

Copy link
Copy Markdown
Contributor

@ksitton58 BTW, you can get the tests to rekick (though it's all of them) if you close and reopen the PR

…gin page

The new Tailwind login page hardcoded hex color values that exactly
duplicate the design tokens defined in components/tailwind.css. Swap them
for the corresponding var(--color-*) tokens so the page stays in sync with
the design system if the palette changes. The token values are identical to
the previously hardcoded hex, so there is no visual change.

The control-label color (#333333) and the alpha-channel rgba() shadows are
left as-is since they have no exact token equivalent.
@ksitton58 ksitton58 force-pushed the fix/login-page-semantic-color-tokens branch from 34bce93 to bf8b784 Compare June 11, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants