Let the blog contents column stay in view while scrolling
The site wrapper's overflow-x: hidden made it a scroll container, so nothing inside it could be position: sticky. overflow-x: clip keeps the sideways clipping without that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d17a572916
commit
3993005918
1 changed files with 4 additions and 1 deletions
|
|
@ -158,8 +158,11 @@ export default function Layout() {
|
||||||
}, [location.pathname, headerHeight]);
|
}, [location.pathname, headerHeight]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
// overflow-x-clip, not -hidden: hidden makes this div a scroll
|
||||||
|
// container, and then nothing inside it can be position: sticky
|
||||||
|
// (a blog post's contents column scrolled away with the page).
|
||||||
<div
|
<div
|
||||||
className="min-h-screen overflow-x-hidden"
|
className="min-h-screen overflow-x-clip"
|
||||||
style={{ "--header-h": `${headerHeight}px` } as React.CSSProperties}
|
style={{ "--header-h": `${headerHeight}px` } as React.CSSProperties}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue