Skip to content

Commit 5d92ca1

Browse files
Add scroll indicator gradient to table of contents
On mobile, the TOC container clips content at max-height without visually indicating there is more below. Adds a CSS gradient fade at the bottom to signal scrollable content. Fixes #1799
1 parent df3cec9 commit 5d92ca1

File tree

1 file changed

+13
-0
lines changed
  • common-theme/assets/styles/04-components

1 file changed

+13
-0
lines changed

common-theme/assets/styles/04-components/toc.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
var(--theme-spacing--4);
1010
overflow-y: auto;
1111
counter-reset: item;
12+
position: relative;
13+
14+
// Gradient fade at bottom to indicate scrollable content (closes #1799)
15+
&::after {
16+
content: "";
17+
position: absolute;
18+
bottom: 0;
19+
left: 0;
20+
right: 0;
21+
height: 2em;
22+
background: linear-gradient(transparent, var(--theme-color--paper));
23+
pointer-events: none;
24+
}
1225

1326
ol {
1427
color: var(--theme-color--ink);

0 commit comments

Comments
 (0)