fix(ui): use brand color tokens instead of hardcoded hex in new UI#14999
Open
ksitton58 wants to merge 1 commit into
Open
fix(ui): use brand color tokens instead of hardcoded hex in new UI#14999ksitton58 wants to merge 1 commit into
ksitton58 wants to merge 1 commit into
Conversation
Several new-UI templates hardcoded brand colors that should reference the design tokens defined in components/tailwind.css: - calendar.html: active engagement/test events used the legacy Bootstrap primary blue (#337ab7) instead of the brand blue. - benchmark.html: table link color, same legacy #337ab7. - base.html: sidebar background (DefectDojo#3864) and sub-nav link color (#82B0D9) hardcoded the Fuji Blue brand hues. These now use the matching var(--color-dd-primary-*) tokens (500/900/200). Token values are identical to the hardcoded hex, so there is no visual change. Intentionally left as-is: - The sidebar lighter link color (#C6DDF2): the matching shade (dd-primary-100) is not emitted in the compiled CSS, since Tailwind v4 only outputs theme variables referenced by a generated utility. - PDF report templates also contain #337ab7, but CSS custom properties do not resolve in the PDF renderer. - Generic white/black, neutral grays, and the custom #002a4d shade have no design token. FullCalendar 3.10.5 applies the event color verbatim as an inline style, so the variable resolves at render time. Verified in the running new UI: sidebar bg = rgb(0,56,100), sub-nav link = rgb(130,176,217), calendar event = rgb(23,121,197) -- each identical to the hex it replaced.
a4a8ba1 to
c93f3b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Several new-UI templates hardcoded brand colors that should reference the design
tokens in
components/tailwind.css:calendar.html— active engagement/test events used the legacy Bootstrap primaryblue (
#337ab7) instead of the brand blue.benchmark.html— table link color, same legacy#337ab7.base.html— sidebar background (#003864) and sub-nav link color (#82B0D9)hardcoded the Fuji Blue brand hues.
These now use the matching
var(--color-dd-primary-*)tokens (500 / 900 / 200). Thetoken values are identical to the hardcoded hex, so there is no visual change.
Intentionally left as-is:
#C6DDF2): the matching shade (dd-primary-100) isnot emitted in the compiled CSS, since Tailwind v4 only outputs theme variables
that a generated utility references.
#337ab7, but CSS custom properties don't resolvein the PDF renderer.
#002a4dshade have no token.FullCalendar 3.10.5 applies the event
colorverbatim as an inline style, so thevariable resolves at render time.
Test results
Verified in the running new UI: sidebar bg =
rgb(0,56,100), sub-nav link =rgb(130,176,217), calendar event =rgb(23,121,197)— each identical to the hex itreplaced. No Python changed, so no unit tests added.
Documentation
N/A.
Checklist
dev.