Primer branding: align accent colors with Primer color tokens - #174
Draft
github-actions[bot] wants to merge 1 commit into
Draft
Primer branding: align accent colors with Primer color tokens#174github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…kens Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Color
--agent-purple(light) and--agent-purple-dark(both themes) were hardcoded hex values (#8250df,#6639ba) unrelated to any Primer scale variable, unlike every other brand accent color in this file (--accent-blue,--accent-green,--label-*, etc.), which all follow thevar(--color-X, #hexFallback)pattern so they inherit Primer's@primer/csscustom properties when available. Per theprimer-brandMCP token data (primer_brand_tokens --query "purple"/ color primitives),#8250dfcorresponds to Primer's--color-done-emphasisand#6639bato--color-done-fg. Updated both to reference those Primer variables with the existing hex as fallback, matching the pattern already used for every sibling color token in the same:root/[data-color-mode="dark"]blocks.--accent-green-solid/--accent-green-hover(light theme) were similarly hardcoded (#1f883d,#1a7f37) even though the sibling--accent-greenvariable two lines above already usedvar(--color-success-emphasis, #1f883d). Aligned them tovar(--color-success-emphasis, ...)andvar(--color-success-fg, ...)respectively, consistent with Primer's semantic success-color tokens and the rest of the file's convention.Deliberately not changed
--label-*and--accent-green-solid/--accent-green-hovervariables were left as raw hex. The repo's owntest/a11y.test.jsregex-parses these dark-theme values as literal 6-digit hex to compute WCAG contrast ratios (darkVar()matches#[0-9a-fA-F]{6}directly); wrapping them invar(--color-x, #hex)broke that test even though the visual/computed color is unchanged. Rather than touch the test harness (out of scope for a presentational-only change), I kept those dark-mode values as plain hex.--font-sans,--font-mono) and spacing (rem/px usage) were reviewed against Primer Brand's font-stack and spacing-scale tokens; the existing system-font stack and rem-based spacing did not show clear, low-risk deviations worth changing without restructuring layout, so left untouched per the "focused change set" guidance.Validation
npm test— 199/199 tests passing (13 files).npm run build— succeeds,dist/output generated without errors.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
cdn.jsdelivr.netTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.