Skip to content

Commit

Permalink
fix: resolve single-line code block wrapping issue (#121)
Browse files Browse the repository at this point in the history
white-space should be pre-wrap - or else, a single long line of code block may break the layout of whole page on mobile devices

use word break for code and blockquote, white-space: pre for fenced code
  • Loading branch information
audacioustux authored Sep 20, 2023
1 parent adb2c51 commit 8f08018
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@
@apply bg-skin-card-muted;
}

code {
code, blockquote {
word-wrap: break-word;
}

pre > code {
white-space: pre;
overflow: scroll;
}
}

Expand Down

0 comments on commit 8f08018

Please sign in to comment.