Skip to content
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

Address local ToC overflow and horizontal scrolling issues #42

Merged
merged 7 commits into from
Oct 5, 2023

Conversation

Mandrenkov
Copy link
Collaborator

@Mandrenkov Mandrenkov commented Oct 5, 2023

Context:

There are currently (at least) two issues with the Xanadu Sphinx Theme:

  1. The local ToC (on the RHS of the screen) can overlap with the footer.
  2. The PennyLane Docs website (on mobile) shows a global horizontal scrollbar on most pages.

Description of the Change:

This PR addresses both of the issues above:

  1. The first issue is solved by calculating the height and top offset of the local ToC more carefully. As a bonus, the local ToC also "bounces" with the screen on MacOS when scrolling against the bottom boundary of the window.

overflow

  1. The second issue is fixed by adding max-width and overflow-x to elements where appropriate.
Figure Table
Screenshot 2023-10-05 at 3 05 59 PM Screenshot 2023-10-05 at 3 07 13 PM

As a bonus, this PR also fixes the formatting of the PR references in the changelog.

Benefits:

  • The PennyLane Docs pages have fewer visual bugs and a better navigation experience on mobile.

Possible Drawbacks:

None.

Related GitHub Issues:

None.


Preview: https://xanadu-sphinx-theme--42.org.readthedocs.build/en/42/

@Mandrenkov Mandrenkov marked this pull request as ready for review October 5, 2023 20:20
Copy link
Contributor

@LucasSilbernagel LucasSilbernagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @Mandrenkov , this looks tricky to do in Sphinx! 🎉

@Mandrenkov Mandrenkov merged commit 9cf64f6 into master Oct 5, 2023
2 checks passed
@Mandrenkov Mandrenkov deleted the sc-46641-fix-overflow-and-scrolling-issues branch October 5, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants