-
-
Notifications
You must be signed in to change notification settings - Fork 186
feat: pin package header 📌 #566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
7ac42c6 to
256db81
Compare
256db81 to
3b0d791
Compare
3b0d791 to
8071aaa
Compare
8071aaa to
18256fa
Compare
|
Ah, something's messed up. Going to fix this. 🤔 |
18256fa to
0579ad8
Compare
Should be fine now. |
|
Is it not possible to have a sticky header through CSS rather than manually adding a scroll listener? Maybe I'm missing something 🤔 |
It is! It's "only" needed for the bottom border, which gets added conditionally when the header is in the "pinned state". |
0579ad8 to
a1bb220
Compare
a1bb220 to
0627825
Compare
|
ooh yeah i understand now! thanks for clarifying. its a shame CSS doesn't have a pseudo-class for this 😅 |
0627825 to
5286991
Compare
5286991 to
30e5ce2
Compare
Pins the package header during scrolling.
package-header-pin.mp4
The template changes look a bit wild, but I basically just kept the now-pinned-content in the already existing
<header>element and just moved the rest into a new element below the<header>element.Eager to get feedback, especially on the
checkHeaderPositionfunction.❤️