From 407c5676d61985d9061adb77ed2de5bfcc0312ec Mon Sep 17 00:00:00 2001 From: Katie Langerman <18661030+langermank@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:18:15 -0800 Subject: [PATCH] Add `monospace` CSS var (#2566) * add monospace typography token * fix fallback style * Create tall-chairs-push.md * Update src/support/variables/typography.scss --- .changeset/tall-chairs-push.md | 5 +++++ src/support/variables/typography.scss | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tall-chairs-push.md diff --git a/.changeset/tall-chairs-push.md b/.changeset/tall-chairs-push.md new file mode 100644 index 0000000000..ddf0ca2420 --- /dev/null +++ b/.changeset/tall-chairs-push.md @@ -0,0 +1,5 @@ +--- +"@primer/css": patch +--- + +Add `monospace` CSS var to global scss var diff --git a/src/support/variables/typography.scss b/src/support/variables/typography.scss index 6ea8ba4482..ae02718b43 100644 --- a/src/support/variables/typography.scss +++ b/src/support/variables/typography.scss @@ -36,7 +36,7 @@ $body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetic // Monospace font stack // Note: SFMono-Regular needs to come before SF Mono to fix an older version of the font in Chrome -$mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace !default; +$mono-font: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace) !default; // The base body size $body-font-size: 14px !default;