Skip to content

Commit ee7ff82

Browse files
raindevnazarien
authored andcommitted
theme/css/general.css: fix mobile page width
Prevent tables from breaking mobile page width Constrain tables to the page width and make content scrollable. Do not restrict table size large screens (when navigation sidebar is displayed by default). Co-authored-by: Nazar Barchuk <[email protected]>
1 parent a5ef90f commit ee7ff82

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/theme/css/general.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ li.js-unavailable {
5555

5656
table {
5757
border-collapse: collapse;
58+
display: block;
59+
overflow-y: auto;
5860
}
5961
table td {
6062
padding: 3px 20px;
@@ -267,8 +269,9 @@ body {
267269
width: 100%;
268270
}
269271
#page-wrapper {
270-
width: 100%;
271-
padding: 0 10px;
272+
--content-padding: 10px;
273+
padding: 0 var(--content-padding);
274+
width: calc(100% - var(--content-padding) * 2);
272275
}
273276
#search-wrapper,
274277
#page-wrapper main {
@@ -316,6 +319,9 @@ body {
316319
display: flex;
317320
flex-direction: column;
318321
}
322+
table {
323+
display: table;
324+
}
319325
}
320326

321327
@media (prefers-color-scheme: dark) {

0 commit comments

Comments
 (0)