-
-
Notifications
You must be signed in to change notification settings - Fork 993
Use CSS instead of JS for floating docs banner #1988
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
Comments
Where this floating error visually can be seen? in which page ? |
arpan8925
added a commit
to arpan8925/djangoproject.com
that referenced
this issue
May 14, 2025
@adamzap I tried doing a PR with that specific commit, but it just took all my commits, don't know how, need help in that case, also check the last commit, it may fix it |
arpan8925
added a commit
to arpan8925/djangoproject.com
that referenced
this issue
May 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I refactored the JavaScript for the floating docs banner in #1972, I suggested using a CSS-only solution. I tried unsuccessfully in #1799, but I hope
position: sticky
could still work somehow.Another approach would be to use
position: fixed
, but we would have to make the content fixed-height. This would be difficult given the amount of text that is currently in the banner element:The current JavaScript approach feels a bit complex to me and can lead to some odd scroll behavior.
I think this (S)CSS should work if we can make the element fixed-height:
I'd be happy to implement a solution if there is a way forward here.
The text was updated successfully, but these errors were encountered: