Skip to content

Commit e30bae9

Browse files
committed
simplify fix for non-wrapping inline code in admonitions
1 parent 611be67 commit e30bae9

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

ui/src/css/doc.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@
209209
white-space: nowrap;
210210
}
211211

212+
/* Allow inline code to wrap in admonition blocks to prevent overflow */
213+
.doc .admonitionblock td.content code:not(.hljs) {
214+
white-space: normal;
215+
word-break: break-word;
216+
overflow-wrap: break-word;
217+
}
218+
212219
.doc code,
213220
.doc pre {
214221
hyphens: none;
@@ -1454,11 +1461,11 @@
14541461
font-weight: var(--heading-font-weight);
14551462
}
14561463

1457-
/* Prevent inline code text from wrapping in table cells */
1458-
td .pre,
1459-
td .code,
1460-
td p code,
1461-
td li code,
1464+
/* Prevent inline code text from wrapping in table cells (but not in admonition blocks) */
1465+
.tableblock td .pre,
1466+
.tableblock td .code,
1467+
.tableblock td p code,
1468+
.tableblock td li code,
14621469
.tableblock p code,
14631470
.tableblock li code {
14641471
white-space: nowrap !important;

0 commit comments

Comments
 (0)