feat(web): global word-wrap toggle for code and diff views (#985)

* refactor(web): add per-line shiki line-splitting helper

* feat(web): add global word-wrap toggle for code, markdown, and diff views

* feat(web): add a shaded gutter background behind line numbers

* fix(web): make DiffView compact rows follow the global wrap setting
This commit is contained in:
Junmo Kim
2026-07-27 19:09:59 +08:00
committed by GitHub
parent d53e25700d
commit e52443f4cf
21 changed files with 1113 additions and 116 deletions
+4 -16
View File
@@ -510,26 +510,14 @@ body {
color: inherit;
}
.aui-md-codeblock pre.shiki {
margin: 0;
padding: 0.75rem 1rem;
background-color: transparent !important;
font-size: 0.875rem;
}
.aui-md-codeblock pre.shiki code {
display: block;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.aui-md-codeblock .shiki,
.aui-md-codeblock .shiki span {
.aui-md-codeblock .shiki span:not([data-line-number]) {
background-color: transparent !important;
}
/* Shiki dual theme colors */
.shiki,
.shiki span {
.shiki span:not([data-line-number]) {
color: var(--shiki-light) !important;
font-style: var(--shiki-light-font-style) !important;
font-weight: var(--shiki-light-font-weight) !important;
@@ -537,9 +525,9 @@ body {
}
html[data-theme="dark"] .shiki,
html[data-theme="dark"] .shiki span,
html[data-theme="dark"] .shiki span:not([data-line-number]),
html[data-theme="oled"] .shiki,
html[data-theme="oled"] .shiki span {
html[data-theme="oled"] .shiki span:not([data-line-number]) {
color: var(--shiki-dark) !important;
font-style: var(--shiki-dark-font-style) !important;
font-weight: var(--shiki-dark-font-weight) !important;