Skip to content

Commit b46bee3

Browse files
authored
fix(CodeSnippet): preserve whitespace in single, inline variants (#7728)
1 parent 3564f70 commit b46bee3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/components/src/components/code-snippet/_code-snippet.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@
176176
@include type-style('code-01');
177177

178178
padding-right: $spacing-03;
179-
white-space: nowrap;
179+
}
180+
181+
// Preserve whitespace, but don't allow wrapping for inline and single
182+
.#{$prefix}--snippet--single pre,
183+
.#{$prefix}--snippet--inline code {
184+
white-space: pre;
180185
}
181186

182187
// Multi Line Snippet

0 commit comments

Comments
 (0)