Skip to content

Commit 37e8a42

Browse files
committed
Adjust sticky rail offsets and max-height calculations for improved viewport usage
1 parent 339984f commit 37e8a42

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

web/components/profile/profile-info.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,13 @@ function ProfileContent(props: {
483483
`row-span-2` gives the sticky element a containing block taller than itself, which is what
484484
it needs to have anywhere to travel. */}
485485
<ScrollPanel
486-
className="lg:sticky lg:top-24 lg:col-start-2 lg:row-span-2 lg:row-start-1"
486+
className="lg:sticky lg:top-6 lg:col-start-2 lg:row-span-2 lg:row-start-1"
487487
// `lg:pr-5` is the gutter the card's padding used to provide: without it the values, the
488488
// Big Five numbers in particular, sit hard against the scrollbar and get clipped by it.
489-
scrollClassName="lg:overflow-y-auto lg:max-h-[calc(100vh-8rem)] lg:pr-5"
489+
// The offset is small because nothing is pinned over the top of this page on desktop — the
490+
// nav is the left column, not a bar — so anything larger is just unused viewport: the rail
491+
// is the tallest thing here and every pixel of the cap is a pixel less to scroll.
492+
scrollClassName="lg:overflow-y-auto lg:max-h-[calc(100vh-3rem)] lg:pr-5"
490493
fadeColorClass="from-canvas-100 to-transparent"
491494
>
492495
<RailBlocks profile={profile} userActivity={userActivity} isCurrentUser={isCurrentUser} />

0 commit comments

Comments
 (0)