Skip to content

Commit 6dac4a6

Browse files
authored
Merge pull request #132 from froschdesign/hotfix/60
Fixes #60 - Very long table of contents overlaps footer section
2 parents 5e92974 + c913a88 commit 6dac4a6

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

asset/sass/blocks/_toc.scss

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
margin-left: map_get($spacers, 4);
44

55
@media (min-width: 1750px) {
6-
margin-top: 6rem;
76
margin-left: -20rem;
87
margin-bottom: 0;
9-
position: fixed;
10-
border-right: 1px solid $separater-color;
11-
padding-right: map_get($spacers, 3);
8+
position: sticky;
129
width: 18rem;
10+
height: 0;
11+
top: 2rem;
1312
text-align: right;
1413
}
1514

@@ -20,6 +19,7 @@
2019
&__headline {
2120
color: $text-color-reduced;
2221
margin: 0 0 map_get($spacers, 2);
22+
padding-right: map_get($spacers, 3);
2323
font-size: $font-size-base;
2424
}
2525

@@ -28,6 +28,30 @@
2828
padding-left: 0;
2929
margin-bottom: 0;
3030
font-size: $font-size-base * 0.9;
31+
border-right: 1px solid $separater-color;
32+
33+
@media (min-width: 1750px) {
34+
padding-right: map_get($spacers, 3);
35+
max-height: calc(100vh - 400px);
36+
min-height: 100px;
37+
overflow-x: hidden;
38+
overflow-y: auto;
39+
}
40+
41+
scrollbar-color: darken($separater-color, 30%) $separater-color;
42+
scrollbar-width: thin;
43+
44+
&::-webkit-scrollbar {
45+
width: 5px;
46+
47+
&-track {
48+
background: $separater-color;
49+
}
50+
51+
&-thumb {
52+
background: darken($separater-color, 30%);
53+
}
54+
}
3155

3256
&-item {
3357
border: none;

css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)