From 83250f82751092cc9ad3a8fb46262a0f0f2a3a96 Mon Sep 17 00:00:00 2001 From: Steven Laidlaw Date: Wed, 30 Nov 2022 10:37:08 +0800 Subject: [PATCH] Fix inline code collapsing spaces (#2330) * Updated to prevent spaces from collapsing while inside inline code blocks * Added changeset * Add comment Co-authored-by: simurai --- .changeset/forty-swans-dress.md | 5 +++++ src/markdown/code.scss | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/forty-swans-dress.md diff --git a/.changeset/forty-swans-dress.md b/.changeset/forty-swans-dress.md new file mode 100644 index 0000000000..d5ab9e014b --- /dev/null +++ b/.changeset/forty-swans-dress.md @@ -0,0 +1,5 @@ +--- +'@primer/css': patch +--- + +Fix collapsing spaces within inline code blocks diff --git a/src/markdown/code.scss b/src/markdown/code.scss index f505cf2044..30dc842d25 100644 --- a/src/markdown/code.scss +++ b/src/markdown/code.scss @@ -10,6 +10,7 @@ font-size: 85%; background-color: var(--color-neutral-muted); border-radius: $border-radius; + white-space: break-spaces; // keeps rendering spaces, but breaks them onto multiple lines br { display: none; } }