Skip to content

Commit 5208380

Browse files
authored
Adjust ToC and main layout breakpoints under td-no-left-sidebar (#2515)
1 parent 75e091c commit 5208380

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

assets/scss/td/extra/_main-container.scss

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@
66
display: none !important;
77
}
88

9-
// Adjust right/ToC sidebar, when visible (i.e., at md and up).
109
.td-sidebar-toc {
11-
@include media-breakpoint-up(md) {
12-
@extend .col-md-2;
10+
// Hidden on narrow viewports below xl
11+
12+
@include media-breakpoint-up(xl) {
13+
@extend .col-xl-2;
1314
display: block !important;
15+
// Ensure ToC top aligns with the navbar bottom
16+
margin-top: $td-navbar-min-height;
1417
}
1518
}
1619

1720
// The <main> element sibling of the ToC sidebar
1821
> div > main {
19-
// Always 10 col wide (unless the ToC sidebar is hidden)
20-
@extend .col-md-10;
22+
@extend .col-md-12;
2123
@extend .col-xl-10;
2224

23-
@include media-breakpoint-up(md) {
25+
// Only add padding when the ToC is visible
26+
@include media-breakpoint-up(xl) {
2427
padding-right: 3rem;
2528
}
2629

2730
@include media-breakpoint-up(lg) {
2831
// Center content on larger screens
29-
3032
.td-content,
3133
.td-breadcrumbs {
3234
max-width: 80%;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docsy",
3-
"version": "0.14.0-dev+87-gc725abe7",
3+
"version": "0.14.0-dev+89-g75e091ce",
44
"repository": "github:google/docsy",
55
"homepage": "https://www.docsy.dev",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)