Skip to content

Commit 0380b6a

Browse files
committed
fix(css): Enable text wrapping in fixed-width tables
Add word-wrap and overflow-wrap properties to table cells to allow long text content to wrap properly when table-layout is fixed. This ensures column widths are respected while keeping content readable. Signed-off-by: Manorit Chawdhry <[email protected]>
1 parent acfa2f5 commit 0380b6a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

_static/css/theme_overrides.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@
2727
font-weight: 400;
2828
color: hsla(0, 0%, 100%, .3);
2929
}
30+
31+
/* Force tables with colgroup to respect column widths */
32+
table.docutils.align-default colgroup + * {
33+
table-layout: fixed;
34+
}
35+
table.docutils.align-default {
36+
table-layout: fixed;
37+
}
38+
39+
/* Allow text wrapping in table cells to respect width constraints */
40+
table.docutils.align-default th,
41+
table.docutils.align-default td {
42+
white-space: normal !important;
43+
word-wrap: break-word !important;
44+
overflow-wrap: break-word !important;
45+
}

0 commit comments

Comments
 (0)