Switch to position: sticky and rely on scroll-padding-top
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 233
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 60
Description
PR #873 added the scroll-padding-top property to ensure the topbar wouldn't cover body content. It also added a JS workaround because scroll-padding-top was not yet supported on latest Safari. Now it is. I propose to remove the JS workaround. That will also fix #1334.
Also, there's a newer alternative to position: sticky: position: fixed: https://developer.mozilla.org/en-US/docs/Web/CSS/position. It's available on all our supported browsers. The difference is that a position: sticky element participates in the DOM layout, and then transitions to fixed position once you scroll far enough. This makes it less fragile to layout the items below the sticky one, since you don't have to give everything a top offset. I propose to switch to position: sticky for the topbar.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review PR #873 and the current topbar implementation, then compare the issue's conflicting references to position: sticky and position: fixed. Done means removing the Safari JavaScript workaround, relying on scroll-padding-top, and confirming that the change addresses #1334 across the supported browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend, web-dev
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100