Skip to content

Commit 057fb77

Browse files
committed
misc: better toc layout
1 parent c014fb0 commit 057fb77

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ $toc-width: toc.$desktop-toc-width;
2020
top: calc(#{$navbar-height} + #{$top});
2121
max-height: calc(100vh - #{$navbar-height} - #{$top} - #{$margin-bottom});
2222

23-
margin: $top 1rem $margin-bottom auto;
23+
margin: $top auto $margin-bottom 0;
24+
padding-left: 1rem;
2425
border-left: 1px solid #dddddd;
2526

2627
flex-direction: column;
2728

2829
overflow-y: auto;
2930
@include mixins.scrollbar(4px);
3031
}
31-
32-
.toc {
33-
margin-left: 2rem;
34-
flex-grow: 1;
35-
}
3632
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ declare namespace StylesModuleScssNamespace {
1313
navItem: string;
1414
navbar: string;
1515
right: string;
16-
toc: string;
1716
tocContainer: string;
1817
}
1918
}

website/src/layout/pages/DocPage/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import Sidebar from "@/components/Sidebar";
1313
import TocDesktop from "@/components/Toc/Desktop";
1414
import components from "@/mdx/components";
1515

16-
import { toc as tocClassName } from "@/layout/components/TocContainer/styles.module.scss";
17-
1816
import type { DocPageProps } from "@/layout/pages/types";
1917

2018
export default function DocPage ({ breadcrumb, sidebar, code }: DocPageProps) {
@@ -37,7 +35,7 @@ export default function DocPage ({ breadcrumb, sidebar, code }: DocPageProps) {
3735
</MarkdownWrapper>
3836
</ContentContainer>
3937
<TocContainer>
40-
<TocDesktop toc={toc} className={tocClassName} />
38+
<TocDesktop toc={toc} />
4139
</TocContainer>
4240
</ContentWrapper>
4341
</MainWrapper>

0 commit comments

Comments
 (0)