Skip to content

docs: links take Docusaurus' colours, not Primer's blue - #47

Merged
echarles merged 1 commit into
mainfrom
fix/docs-link-colour
Nov 21, 2026
Merged

echarles merged 1 commit into
mainfrom
fix/docs-link-colour

Conversation

@echarles

Copy link
Copy Markdown
Member

PrimerRoot wrapped the site in Primer's BaseStyles, whose global rule :where(a:not([class*=prc-])…) { color: var(--fgColor-accent) } painted every link of the docs Primer's blue, over Docusaurus' own colours.

A plain div now carries the attributes BaseStyles set (data-portal-root, data-color-mode, data-light-theme, data-dark-theme), so Primer's components and CSS variables still follow the colour mode, and links keep Docusaurus' colours. The footer flex fix is kept.

PrimerRoot wrapped the site in BaseStyles, whose global link rule painted
every link with --fgColor-accent over Docusaurus' own colours. A plain div
now carries the colour-mode attributes Primer's components read.
Copilot AI balanced review requested due to automatic review settings November 21, 2026 04:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the change removing Primer’s global link-colour override.

No open issues 🎉

What changed in this PR

This PR removes Primer’s global link-colour override so documentation links use Docusaurus’ colours.

Changes:

  • Replaces BaseStyles with a plain div, retaining Primer’s portal and colour-mode attributes.
  • Preserves the flex layout that keeps the footer at the bottom of short pages.
  • Updates comments to explain the wrapper’s purpose.
File Description
docs/​src/​theme/​PrimerRoot.tsx Removes BaseStyles while retaining theme attributes, CSS variable imports, and layout styles.

Review effort: Balanced

@echarles
echarles merged commit 9a75e64 into main Nov 21, 2026
5 checks passed
@echarles
echarles deleted the fix/docs-link-colour branch November 21, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants