Skip to content

Commit 046c15c

Browse files
ArdemiumLuiz F. A. de Prá
authored andcommitted
Fix: Code block line numbers styling issue (#820)
- Resolved the issue where enabling line numbers in code blocks caused the content to escape the code block border. - Added necessary CSS to ensure the code block border doe not extends to contain the entire content when line numbers are enabled. - Tested with reproduction steps to confirm the fix works across various scenarios. - additionally fixed long string overflow that causes mobile version stretch Fixes #820
1 parent 3344e09 commit 046c15c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

assets/scss/_base.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ p {
4444
@media only screen and (max-width: 768px) {
4545
margin: 1.5rem 0 1.5rem 0;
4646
}
47+
white-space: pre-wrap;
48+
white-space: -moz-pre-wrap;
49+
white-space: -pre-wrap;
50+
white-space: -o-pre-wrap;
51+
word-wrap: break-word;
4752
}
4853

4954
h1,
@@ -148,6 +153,7 @@ strong {
148153
margin: 2rem 0 2rem;
149154
padding: 1rem;
150155
border-radius: 1rem;
156+
overflow-x: auto;
151157
}
152158
}
153159

@@ -284,4 +290,4 @@ figure {
284290

285291
.fas {
286292
font-weight: 900;
287-
}
293+
}

0 commit comments

Comments
 (0)