Skip to content

Commit 48dd0e2

Browse files
silverwind6543
andauthored
Markdown: Enable wrapping in code blocks and a color tweak (#13894)
- Enable wrapping of long lines in code blocks like already done in code view. - Slightly lighten the background of code blocks on default theme - Darken the background on inline code and kbd elements on arc-green Co-authored-by: 6543 <[email protected]>
1 parent af79677 commit 48dd0e2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

web_src/less/_base.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
--color-menu: #ffffff;
9797
--color-card: #ffffff;
9898
--color-markdown-table-row: #00000008;
99-
--color-markdown-code-block: #00000010;
99+
--color-markdown-code-block: #00000008;
100100
--color-button: #ffffff;
101101
--color-code-bg: #ffffff;
102102
--color-shadow: #00000024;

web_src/less/_markdown.less

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
padding: .2em .3em;
344344
margin: 0;
345345
font-size: 85%;
346-
background-color: var(--color-label);
346+
background-color: var(--color-markdown-code-block);
347347
border-radius: 3px;
348348
}
349349

@@ -360,8 +360,9 @@
360360
padding: 0;
361361
margin: 0;
362362
font-size: 100%;
363-
word-break: normal;
364-
white-space: pre;
363+
white-space: pre-wrap;
364+
word-break: break-all;
365+
overflow-wrap: break-word;
365366
background: transparent;
366367
border: 0;
367368
}
@@ -373,7 +374,6 @@
373374
.highlight pre,
374375
pre {
375376
padding: 16px;
376-
overflow: auto;
377377
font-size: 85%;
378378
line-height: 1.45;
379379
background-color: var(--color-markdown-code-block);
@@ -416,7 +416,7 @@
416416
line-height: 10px;
417417
color: var(--color-text-light);
418418
vertical-align: middle;
419-
background-color: var(--color-label);
419+
background-color: var(--color-markdown-code-block);
420420
border: 1px solid var(--color-secondary);
421421
border-radius: 3px;
422422
box-shadow: inset 0 -1px 0 var(--color-secondary);

0 commit comments

Comments
 (0)