Skip to content

Use fontStack token in $body-font #2864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lukasoppermann
Copy link
Contributor

@lukasoppermann lukasoppermann commented Jul 4, 2025

Updating $body-font variable to use --fontStack-sansSerif

What are you trying to accomplish?

Make sure that the primitives token --fontStack-sansSerif is used for text on github via the $body-font variable.

What approach did you choose and why?

Add --fontStack-sansSerif token to the $body-font variable.

What should reviewers focus on?

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢

Updating $body-font variable to use --fontStack-sansSerif
@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 06:23
@lukasoppermann lukasoppermann requested a review from a team as a code owner July 4, 2025 06:23
@lukasoppermann lukasoppermann requested a review from mperrotti July 4, 2025 06:23
Copy link

changeset-bot bot commented Jul 4, 2025

🦋 Changeset detected

Latest commit: 66f3eb0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the $body-font Sass variable to leverage the new --fontStack-sansSerif CSS custom property while preserving the existing fallback font stack.

  • Introduces var(--fontStack-sansSerif, …fallback fonts…) in place of a hard-coded font list.
Comments suppressed due to low confidence (1)

src/support/variables/typography.scss:35

  • [nitpick] Add a brief comment above this line explaining that $body-font now sources from the --fontStack-sansSerif CSS custom property with fallbacks, so future maintainers understand its purpose.
$body-font: var(--fontStack-sansSerif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji') !default;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant