Skip to content

Include CSS Custom Property for mono font family - #4028

Merged
joshblack merged 4 commits into
mainfrom
joshblack/update-mono-font
Dec 19, 2023
Merged

Include CSS Custom Property for mono font family#4028
joshblack merged 4 commits into
mainfrom
joshblack/update-mono-font

Conversation

@joshblack

@joshblackjoshblack commented Dec 7, 2023

Copy link
Copy Markdown
Member

Generated by Copilot Workspace 🤯

This pull request includes a change to the mono property of the fonts constant in the src/theme.ts file. The change adds 'var(--fontStack-monospace)' to the beginning of the font stack for monospace fonts.

@changeset-bot

changeset-botBot commented Dec 7, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f2c6282

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

This PR includes changesets to release 1 package
NameType
@primer/reactMinor

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

@github-actions

github-actionsBot commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js105.55 KB (+0.01% 🔺)
dist/browser.umd.js106.14 KB (+0.01% 🔺)

@joshblack

Copy link
Copy Markdown
MemberAuthor

✨✨ The PR has been updated by @joshblack with changes produced using Copilot Workspace using Copilot Workspace v0.6

Topic

Add a changeset with a random name that describes these changes and tag it as a minor release

Before
  • The code does not have a changeset for the pull request yet.
  • The code modifies the mono font stack in src/theme.ts to use a CSS variable.
After
  • The code has a changeset for the pull request in .changeset/<random-name>.md with the following content:
---
"@primer/react": minor
---
Use a CSS variable for the monospace font stack
  • The code modifies the mono font stack in src/theme.ts to use a CSS variable.

Comment threadsrc/theme.ts
Comment on lines +25 to +33
mono: fontStack([
'var(--fontStack-monospace)',
'SFMono-Regular',
'Consolas',
'Liberation Mono',
'Menlo',
'Courier',
'monospace',
]),

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.

Suggested change
mono: fontStack([
'var(--fontStack-monospace)',
'SFMono-Regular',
'Consolas',
'Liberation Mono',
'Menlo',
'Courier',
'monospace',
]),
mono: fontStack([
'var(--fontStack-monospace,
SFMono-Regular,
Consolas,
LiberationMono,
Menlo,
Courier,
monospace)',
]),

I think it should be like this, but I'm not 100% sure.

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.

I am now 95% sure I am wrong.

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.

Yeah, I think either version works

@joshblack
joshblack marked this pull request as ready for review December 12, 2023 15:44
@joshblack
joshblack requested review from a team and siddharthkpDecember 12, 2023 15:44
@github-actions
github-actionsBottemporarily deployed to storybook-preview-4028 December 13, 2023 18:32 Inactive
@joshblack
joshblack added this pull request to the merge queueDec 19, 2023
Merged via the queue into main with commit bbe58b8Dec 19, 2023
@joshblack
joshblack deleted the joshblack/update-mono-font branch December 19, 2023 19:17
@primerprimerBot mentioned this pull request Dec 19, 2023
Sign up for freeto 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.

4 participants

@joshblack@siddharthkp@colebemis@langermank