Skip to content

Commit 049cc34

Browse files
authored
Merge pull request #59 from zorexsalvo/fix/prose-table-responsiveness
fix: make prose-custom tables horizontally scrollable on narrow screens
2 parents e156980 + 37fccfb commit 049cc34

File tree

2 files changed

+14
-642
lines changed

2 files changed

+14
-642
lines changed

src/styles/main.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,17 +451,19 @@ body {
451451
}
452452

453453
.prose-custom table {
454+
display: block;
454455
width: 100% !important;
455456
height: auto !important;
456457
border-collapse: collapse !important;
457458
border-spacing: 0 !important;
458459
border: none !important;
459460
border-radius: 1rem;
460-
overflow: hidden;
461+
overflow-x: auto;
461462
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
462463
margin-bottom: 2rem;
463464
font-family: "Nunito", sans-serif;
464465
font-size: 1rem;
466+
-webkit-overflow-scrolling: touch;
465467
}
466468

467469
.prose-custom table th {
@@ -470,17 +472,19 @@ body {
470472
font-family: 'Bantayog', sans-serif !important;
471473
font-weight: 700 !important;
472474
text-align: left !important;
473-
padding: 1rem 1.5rem !important;
475+
padding: 0.75rem 1rem !important;
474476
border: none !important;
477+
white-space: nowrap;
475478
}
476479

477480
.prose-custom table td {
478-
padding: 1rem 1.5rem !important;
481+
padding: 0.75rem 1rem !important;
479482
border: none !important;
480483
border-bottom: 1px solid #e8d5c4 !important;
481484
color: var(--brown-2);
482485
vertical-align: top !important;
483486
text-align: left !important;
487+
min-width: 120px;
484488
}
485489

486490
.prose-custom table tbody tr:nth-child(odd) {

0 commit comments

Comments
 (0)