Skip to content

Commit a08b46c

Browse files
author
xiaoyunchong.xyc
committed
fix: sidebar layout - lower mobile breakpoint to 768px, enforce flex-shrink:0
1 parent b8af6aa commit a08b46c

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎style.css‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,23 +1415,29 @@ footer a:hover {
14151415

14161416
/* Doc sidebar layout - for tutorial, training, etc */
14171417
.doc-layout {
1418-
display: flex;
1418+
display: flex !important;
1419+
flex-direction: row !important;
14191420
gap: 0;
14201421
max-width: 1400px;
14211422
margin: 0 auto;
1423+
min-height: calc(100vh - 60px);
14221424
}
14231425

14241426
.doc-sidebar {
14251427
position: sticky;
14261428
top: 60px;
14271429
width: 240px;
14281430
min-width: 240px;
1431+
max-width: 240px;
1432+
flex-shrink: 0;
14291433
height: calc(100vh - 60px);
14301434
overflow-y: auto;
14311435
border-right: 1px solid var(--line);
14321436
background: var(--surface-2);
14331437
padding: 20px 0;
14341438
font-size: 0.84rem;
1439+
display: flex;
1440+
flex-direction: column;
14351441
}
14361442

14371443
.doc-sidebar a {
@@ -1472,23 +1478,27 @@ footer a:hover {
14721478
max-width: 820px;
14731479
}
14741480

1475-
@media (max-width: 900px) {
1481+
@media (max-width: 768px) {
14761482
.doc-layout {
14771483
flex-direction: column;
14781484
}
14791485
.doc-sidebar {
14801486
position: static;
14811487
width: 100%;
1482-
min-width: 100%;
1488+
min-width: unset;
1489+
max-width: unset;
14831490
height: auto;
1491+
flex-shrink: unset;
14841492
border-right: none;
14851493
border-bottom: 1px solid var(--line);
14861494
display: flex;
1495+
flex-direction: row;
14871496
flex-wrap: wrap;
14881497
padding: 12px;
14891498
gap: 4px;
14901499
}
14911500
.doc-sidebar a {
1501+
display: inline-block;
14921502
padding: 6px 12px;
14931503
border-left: none;
14941504
border-radius: 6px;
@@ -1500,5 +1510,6 @@ footer a:hover {
15001510
}
15011511
.doc-content {
15021512
padding: 24px;
1513+
max-width: 100%;
15031514
}
15041515
}

0 commit comments

Comments
 (0)