Skip to content

Commit ee86a02

Browse files
committed
Fix scrolling on sidebar
1 parent 92ec511 commit ee86a02

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

apps/site/layouts/layouts.module.css

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
.articleLayout {
1111
@apply max-w-8xl
1212
sm:grid-areas-[sidebar_main,sidebar_footer]
13-
lg:grid-areas-[sidebar_._metabar,sidebar_main_metabar,sidebar_footer_metabar]
13+
lg:grid-areas-[sidebar_main_metabar,sidebar_footer_metabar]
1414
mx-auto
1515
block
1616
w-full
17-
overflow-auto
1817
sm:grid
1918
sm:grid-cols-[theme(spacing.52)_1fr]
2019
sm:grid-rows-[1fr]
@@ -24,36 +23,35 @@
2423
xl:grid-cols-[theme(spacing.80)_1fr_theme(spacing.80)];
2524

2625
> *:nth-child(1) {
27-
@apply grid-in-[sidebar];
26+
@apply grid-in-[sidebar]
27+
lg:sticky
28+
lg:top-0
29+
lg:h-[100vh]
30+
lg:overflow-y-auto;
2831
}
2932

3033
> *:nth-child(2) {
3134
@apply contents
32-
overflow-y-scroll
3335
sm:max-lg:block;
3436

3537
> *:first-child {
3638
@apply grid-in-[main]
3739
sm:bg-gradient-subtle
3840
sm:dark:bg-gradient-subtle-dark
3941
xl:px-18
40-
overflow-y-auto
41-
overflow-x-hidden
4242
p-4
4343
motion-safe:scroll-smooth
4444
sm:bg-fixed
45-
sm:p-12
46-
lg:sticky
47-
lg:bottom-[4rem]
48-
lg:h-max
49-
lg:min-h-[calc(100vh_-_4rem)];
45+
sm:p-12;
5046
}
5147

5248
> *:last-child {
5349
@apply grid-in-[metabar]
5450
mt-8
5551
border-t
5652
sm:mt-0
53+
lg:sticky
54+
lg:top-0
5755
lg:max-w-xs
5856
lg:border-l
5957
lg:border-t-0;
@@ -65,7 +63,6 @@
6563
sticky
6664
bottom-0
6765
flex
68-
h-[4rem]
6966
w-full
7067
flex-col
7168
items-center

0 commit comments

Comments
 (0)