Skip to content

Commit 39665e1

Browse files
update css to properly handle table content stretching to fill width (#103)
* update css to properly handle table content stretching * remove part about forcing to 50% for two columns * remove duplicate css
1 parent d73d28d commit 39665e1

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

ui/src/css/doc.css

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
border: 1px solid #D4D4D4;
151151
font-size: 0.95em;
152152
padding: 0.15em 0.4em;
153+
white-space: nowrap;
153154
}
154155

155156
.doc code,
@@ -264,8 +265,7 @@
264265
width: 100%;
265266
border-collapse: separate;
266267
border-spacing: 0;
267-
display: block;
268-
overflow-x: auto;
268+
display: table;
269269
margin-bottom: 1rem;
270270
border: 1px solid #D4D4D4;
271271
border-radius: 8px;
@@ -279,6 +279,20 @@
279279
font-size: inherit;
280280
}
281281

282+
/* Table cell styles */
283+
.doc table.tableblock td,
284+
.doc table.tableblock th {
285+
box-sizing: border-box;
286+
white-space: normal;
287+
word-wrap: break-word;
288+
}
289+
290+
/* Prevent wrapping of inline literal text in tables */
291+
.doc table.tableblock td code,
292+
.doc table.tableblock th code {
293+
white-space: nowrap;
294+
}
295+
282296
.doc td.tableblock > .content {
283297
word-wrap: anywhere; /* aka overflow-wrap; used when hyphens are disabled or aren't sufficient */
284298
}
@@ -1304,4 +1318,4 @@
13041318

13051319
.image-modal-overlay.show {
13061320
display: flex;
1307-
}
1321+
}

0 commit comments

Comments
 (0)