Skip to content

Commit 0e92dca

Browse files
authored
address table mobile overflow, tweak appearance (#4541)
1 parent f342596 commit 0e92dca

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

website/src/css/customTheme.scss

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
--ifm-pagination-nav-color-hover: var(--ifm-color-emphasis-300);
4040
--ifm-navbar-sidebar-width: 100%;
4141
--ifm-hr-border-color: var(--docusaurus-collapse-button-bg-hover);
42+
--ifm-table-head-background: var(--ifm-color-emphasis-100);
43+
--ifm-table-border-color: var(--ifm-toc-border-color);
44+
--ifm-table-cell-padding: 10px;
45+
--ifm-table-stripe-background: rgba(0, 0, 0, 0.02);
4246
--docusaurus-blog-social-icon-size: 16px;
4347

4448
@media (min-width: 340px) {
@@ -103,6 +107,8 @@ html[data-theme="dark"] {
103107
--ifm-code-background: rgba(255, 255, 255, 0.06);
104108
--ifm-toc-border-color: var(--dark);
105109
--ifm-color-emphasis-300: var(--dark);
110+
--ifm-table-head-background: var(--deepdark);
111+
--ifm-table-head-color: var(--docsearch-muted-color);
106112

107113
*[class^="DocSearch"] {
108114
--docsearch-searchbox-background: var(--ifm-background-color);
@@ -305,32 +311,30 @@ hr {
305311
}
306312

307313
table {
308-
border-collapse: collapse;
309314
display: table;
310-
margin: 20px 0;
311315
width: 100%;
316+
table-layout: fixed;
312317

313318
thead tr {
314319
border: 0;
315320
}
316321

317322
tr th {
318-
text-transform: uppercase;
319-
padding: 6px 10px;
320-
font-size: 0.7rem;
323+
padding: 6px var(--ifm-table-cell-padding);
324+
font-size: 80%;
321325
text-align: start;
322326
}
323327

324328
tr td {
325329
font-size: 90%;
326330
line-height: 1.3em;
327-
padding: 10px;
328331
text-align: start;
329332

330333
code {
331334
display: inline-block;
332335
line-height: 1.2em;
333336
vertical-align: top;
337+
word-break: break-word;
334338
}
335339

336340
ul {
@@ -445,6 +449,16 @@ hr {
445449
}
446450
}
447451

452+
@media only screen and (max-width: 996px) {
453+
.markdown table {
454+
display: block;
455+
456+
tr td code {
457+
word-break: normal;
458+
}
459+
}
460+
}
461+
448462
html[data-theme="dark"] {
449463
.markdown {
450464
a {

0 commit comments

Comments
 (0)