mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 22:22:18 +08:00
Long lines in code blocks are not wrapped; instead, a thin scroll bar is added when the content overflows. This scroll bar appears regardless of the user's preference for hiding the scroll bars of the main content window.
This commit is contained in:
parent
7a9a170876
commit
0aa0e04234
@ -97,6 +97,23 @@ div.ag-show-quick-insert-hint p.ag-paragraph.ag-active > span.ag-paragraph-conte
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* TODO: This disables wrapping long lines in code blocks, allowing
|
||||
scrolling instead. Make this contingent on user preference. */
|
||||
.ag-code-content {
|
||||
overflow: auto;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.ag-code-content::-webkit-scrollbar {
|
||||
/* Show scroll bars to deal with unwrapped lines in code blocks,
|
||||
regardless of the preference for hiding scroll bars
|
||||
generally. */
|
||||
display: block;
|
||||
|
||||
height: 3px;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
.ag-selected {
|
||||
background: linear-gradient(17deg, var(--editorBgColor) 36.65%, var(--editorColor04));
|
||||
border-radius: 3px;
|
||||
|
Loading…
Reference in New Issue
Block a user