-
Notifications
You must be signed in to change notification settings - Fork 12
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
Hide TOC when it intersects with margin content #170
Comments
Note that in the end I didn't make the TOC hide when those two objects overlap directly, but instead opted to make the TOC hide when certain classes of objects were on the screen at all (or 33% up or so), that way the TOC would show and hide preemptively and be less jittery. I think that was a nice balance |
@rowanc1 I was checking to see whether we implement the margin directive in myst-theme, or other places, and I can't see that we do. However, the above screenshot seems to imply that we did at one point? In any case, if we don't currently support it, can we close this issue? |
There are ways to use classes/columns on the blocks to put things in the margins, but it isn't very good to put that burden on the user. I can try and dig up the classes later this week and have a go at implementing the margin directive if you want? |
@rowanc1 for this issue my question lies around whether MyST currently supports some-way of putting things in the margins. If we do, regardless of user experience, then is the issue raised by @choldgraf still a problem? Then, for the directive, that's now tracked in #327. I can tackle it in the near term, once I have a sense of what needs doing? Equally happy for you to tackle! |
Just sharing the grid system page of the Myst theme docs, which seems to be the recommended way to control things like margins if I understand https://executablebooks.github.io/myst-theme/?path=/docs/components-grid-system--docs |
Oh, how did that not turn up in any of my searches 🤦? Fab, I am now following. We're talking about something like |
I had the same challenge haha, the only way I found those Myst theme docs was via the GitHub repo URL link. I should have opened a PR for the dev docs, sorry about that! Will try to do it quickly today
|
There is also an issue at the moment of margins being embedded in admonitions, because these can't pop out of their grid, things look very broken. |
Fixed by #373 |
There is some code @choldgraf has pointed us to here:
https://github.com/executablebooks/sphinx-book-theme/blob/a9794b73cec766e01bee35a96f7d44e22851f278/src/sphinx_book_theme/assets/scripts/index.js#L66
The text was updated successfully, but these errors were encountered: