Primer branding: reuse existing radius/color tokens - #295
Merged
Merged
Conversation
…l values Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
There was a problem hiding this comment.
Reviewer kind: ponytail — this is a purely presentational CSS token-consistency refactor.
Verified: --accent-green-rgb values (31,136,61 / 63,185,80) and --radius-md/--radius-lg (8px/12px) match exactly what was previously hardcoded, so this is a safe, behavior-preserving swap to reuse existing tokens. No UI, accessibility, or functional impact. No blocking issues found.
Generated by Specialist PR Review for #295 · copilot · auto · 15.5 AIC · ⌖ 5.85 AIC · ⊞ 6.8K
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.
What changed
Spacing / color tokens (consistency with existing tokens):
.anti-pattern-cardand.ap-rateused literalborder-radius: 8px/12pxinstead of this file's own already-definedvar(--radius-md)(--borderRadius-medium, 8px) andvar(--radius-lg)(--borderRadius-large, 12px) tokens used everywhere else in the stylesheet.--shadow-btn-primary-hovervalues duplicated the green accent as a literal RGB triplet (rgba(31, 136, 61, 0.25)/rgba(63,185,80,0.3)) instead of the file's own--accent-green-rgbcustom property, which is already defined per color-mode and used for this exact purpose elsewhere (e.g. the.progress-step.completedfocus ring and pulse animation).Brand guidance that motivated each change
Fetched via the
primer-brandMCP server (primer_brand_review, bundled snapshot of@primer/react-brand@0.76.0):8px/12pxradii with this project's existing--radius-md/--radius-lgtokens (which already resolve to Primer's--borderRadius-medium/--borderRadius-large).primer_brand_tokens): prefer resolving to a single token source of truth rather than duplicating a color's numeric value in multiple places — applied to the--shadow-btn-primary-hovergreen RGB duplication.Deviations found but deliberately not fixed, and why
#ffffff,#f6f8fa,#24292f,#57606a, etc.): every one of these hex values in:rootis already the required CSS custom-property fallback syntax, e.g.var(--color-canvas-default, #ffffff), correctly paired with the matching Primer CSS variable. There is nothing to fix here without breaking the fallback-value pattern the file already uses consistently for both light and dark mode.border-radius: 50%): all 9 occurrences are small functional UI elements — step indicators, radio/checkbox dots, a modal close button, spark/ring decorations — not marketing CTAs or primary buttons. Primer Brand's "no pill buttons" guidance (fromprimer_brand_page_design) targets Hero/CTABanner-style call-to-action buttons; the site's actual.btnclasses already use the modestvar(--radius-md)corner radius, not full rounding. Left unchanged as out of scope for this guidance.@primer/react-brandcomponents were imported." This site is intentionally plain HTML/CSS layered on@primer/css(not the React marketing library@primer/react-brand), per the project's own architecture; adopting@primer/react-brandcomponents would be a structural change outside this workflow's presentational-only scope.Validation
npm test: 326/327 passing — the 1 pre-existing failure (test/copilot-instructions.test.js, a stale generated-date assertion unrelated to styling) also fails identically onmainbefore this change.npm run build: theprebuildstep (fetch-vendor-assets.mjs) fails in this sandbox because it needs registry access to vendor@primer/css/transformers.js— reproduced identically onmain, confirming it's a pre-existing environment limitation, not caused by this change. Rannpx vite builddirectly (bypassing only the network-dependent vendor-fetch step) with a placeholdervendor/primer/primer.cssto confirm the actual CSS/HTML/JS compiles cleanly with no errors; build artifacts were removed afterward.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
registry.npmjs.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.