remix-run / remix-website

322 stars 72 forks source link

Make doc nav sticky instead of fixed #253

Closed brookslybrand closed 4 months ago

brookslybrand commented 4 months ago

Fix currently deployed to staging

https://github.com/remix-run/remix-website/assets/12396812/b7c466c4-ee58-4a5e-8479-8da13d9f5b77

Fixes #239

brookslybrand commented 4 months ago

If you want to completely avoid duplicating values, you can set header height in a CSS variables via classes. On a common container you set the class [--header-height:theme(spacing.16)], then h-[--header-height] and h-[calc(100vh-var(--header-height))].

Great suggestion! I'll have to make these adjustments when I get back. Was trying to squeeze this in before going out of town, but I don't think I gave myself enough time.

Thanks so much for the review!