Skip to content

Commit 8447d45

Browse files
committed
fix: dont render toc column on mobile
1 parent 3bd5c59 commit 8447d45

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

website/src/layout/components/TocContainer/styles.module.scss

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,26 @@ $navbar-height: navbar.$navbar-height;
66
$toc-width: toc.$desktop-toc-width;
77

88
.column {
9-
width: 100%;
10-
flex: 0 0 #{$toc-width};
11-
max-width: $toc-width;
12-
}
9+
@include mixins.desktop-only(flex) { width: 100%;
10+
flex: 0 0 #{$toc-width};
11+
max-width: $toc-width;
1312

14-
.tocContainer {
15-
@include mixins.desktop-only(flex) {
16-
$top: 1rem;
17-
$margin-bottom: 1rem;
18-
19-
position: sticky;
20-
top: calc(#{$navbar-height} + #{$top});
21-
max-height: calc(100vh - #{$navbar-height} - #{$top} - #{$margin-bottom});
22-
23-
margin: $top auto $margin-bottom 0;
24-
padding-left: 1rem;
25-
border-left: 1px solid #dddddd;
26-
27-
flex-direction: column;
28-
29-
overflow-y: auto;
30-
@include mixins.scrollbar(4px);
13+
.tocContainer {
14+
$top: 1rem;
15+
$margin-bottom: 1rem;
16+
17+
position: sticky;
18+
top: calc(#{$navbar-height} + #{$top});
19+
max-height: calc(100vh - #{$navbar-height} - #{$top} - #{$margin-bottom});
20+
21+
margin: $top auto $margin-bottom 0;
22+
padding-left: 1rem;
23+
border-left: 1px solid #dddddd;
24+
25+
flex-direction: column;
26+
27+
overflow-y: auto;
28+
@include mixins.scrollbar(4px);
29+
}
3130
}
3231
}

0 commit comments

Comments
 (0)