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

🐛 FIX: fixing right toc whitespace overlap #268

Merged
merged 2 commits into from
Dec 6, 2020

Conversation

choldgraf
Copy link
Member

@choldgraf choldgraf commented Dec 5, 2020

This is an attempt at fixing the right TOC, which currently has a white background that blocks any right margin content.

This PR:

  • Makes the box shadow now span the whole topbar. This is because when the TOC wasn't shown, the shadow would "end" just before the TOC block instead of extending to the side of the page
  • Makes the left sidebar have a white background (so that it blocks the shadow on the left)

However, there is one snag which is that currently the right TOC doesn't quite cover up the topbar shadow:

image

@pradyunsg do you have any ideas? It would be great to get some help on this fix. You mentioned when you submitted the PR that you had this working, perhaps you remember what you had done before? Or maybe @AakashGfude has ideas? This is a pretty major bug we should fix because nobody's sidebar content will work properly

To see an example of this bug, see: https://sphinx-book-theme.readthedocs.io/en/latest/layout.html#content-sidebars

closes #267

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

Looks A-OK to me?

@choldgraf
Copy link
Member Author

I think it looks fine except the drop shadow sticks out to the right of the top (see the image I posted). Any thoughts on how to fix this?

@choldgraf
Copy link
Member Author

@pradyunsg I think I might have fixed it in the latest commit, how does it look? There is a slightly hacky approach, which is to position the TOC at -1em in order to overlap the 1em right padding that the body div has, and this makes the right TOC align with the right side of the page

@pradyunsg
Copy link
Member

I like it. :shipit:

@choldgraf
Copy link
Member Author

OK I'm gonna merge this in because it's fixing a kinda gnarly bug right now, and the new CSS rules seem to be behaving as we'd expect!

@choldgraf choldgraf changed the title fixing right toc 🐛 FIX: fixing right toc whitespace overlap Dec 6, 2020
@choldgraf choldgraf merged commit 1ef9216 into executablebooks:master Dec 6, 2020
@choldgraf choldgraf deleted the fix-toc-bg branch December 6, 2020 16:28
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.

Table of Contents overlaps with sidebar content
2 participants