Repository navigation
Primer branding: fix broken --text-default token reference - #310
Merged
pelikhan merged 1 commit intoOct 4, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pelikhan
marked this pull request as ready for review
October 4, 2026 07:48
pelikhan
deleted the
primer-branding-text-default-token-fix-d5c04b8f26a71a8a
branch
October 4, 2026 07:48
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
Color
.ap-fix stronginsrc/styles/style.cssreferencedvar(--text-default), a CSS custom property that was never defined anywhere in the stylesheet. It silently fell back to the browser default text color (black) in both light and dark mode, breaking dark-mode color parity for anti-pattern "fix" text shown in the wizard. Changed tovar(--text-primary), the site's existing semantic token that maps to Primer'scolor-fg-default(with a light/dark-aware hex fallback), matching how every other text color in the stylesheet is handled.Brand guidance that motivated this change
Retrieved from the
primer-brandMCP server (bundled@primer/react-brand@0.77.0snapshot):--brand-color-text-default,--brand-color-text-muted) are semantic and theme-aware — foreground text should always resolve through a defined, theme-responsive variable rather than falling back to the raw browser default, to preserve light/dark parity and contrast.Audit scope
I reviewed
src/index.html,src/styles/style.css, and markup emitted fromsrc/js/against Primer color, typography, spacing, and voice/tone guidance (colors, font stacks, border-radius scale, spacing tokens, button/heading copy). The site already follows Primer conventions closely:--color-*CSS variable fallbacks, with full light/dark parity.--radius-md/--radius-lgtokens tied to Primer's border-radius scale.Deviations found but not fixed
None — this was the only concrete deviation found. The change set is intentionally minimal (a one-line CSS fix) per the "small, human-reviewable" guidance.
Validation
npm test: 325/327 tests pass. The 2 failing tests (test/copilot-instructions.test.js) are pre-existing pattern-library/manifest drift failures, confirmed present onmainbefore this change (unrelated to this CSS fix).npm run build(full): theprebuildstep fails only because the sandbox blocks outbound npm-registry access (a pre-existing environment network restriction, not a regression caused by this change).npx vite build(core build, bypassing the network-dependent vendor-asset prefetch): succeeds cleanly, confirming the CSS compiles and bundles without errors.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.