-
Notifications
You must be signed in to change notification settings - Fork 15
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
sidebar toggle misbehaves #3
Comments
I don't know of any options for this specifically. But, I'm sure you could produce the desired behavior by editing the css directly. I usually load the page into a browser and use a dev mode to look at page source, then use the target mode to mouse over the html element I'm interested in, then click it, and inspect the css controlling the behavior. After I figure out which bits need to be changed, I add them to the style.css file (this usually takes precedence over the other .css files, and if it doesn't I use !important). Good luck! |
Oh , I see, I did what you said for several hours without success, so I decided to write you. I only managed to do approximately the same as your behavior of sidebar. |
Well I didn't see the problem in your picture, here it is: (after clicking toc menu icon) Left side of toc is missing |
OK, I think I understand what you are talking about. Sorry, I'm a bit distracted. Is it pressing this sidebar button? You're saying that when you press that, the sidebar only half hides and doesn't disappear? For example, you don't get this? Hmmm, after some more digging I was able to reproduce something like the problem: And with some more testing, I was able to totally reproduce the problem in two different browsers. If I make my screen resolution very high, and then systemically decrease the font size of the page, at some point this problem starts occurring. I'm not sure if this is also a bug of the original gitbook style that I modified from, or has something to do with my changes...actually, just tested the above on a different gitbook, and did not find the problem. So, it seems I made some breaking changes. This was a while ago when I was hacking the css to achieve what I thought was working, without really understanding what I was doing. In any case, thanks for letting me know. It seems that there isn't a problem for certain resolution/font-size combos. Otherwise, not sure what the fix is. If I find time to look into this I'll add to this issue, but I'm not sure if/when I'll get around to this. |
As you said, the original bookdown does not have this problem. I think the problem comes from bookdown never disappearing the sidebar truly, but moving it to the left. So, as we changed the bookdown sidebar to be more to the right, when clicking the toggle ("hiding"), it does not hide, because it does not move enough to the left. |
I think the issue might have to do with the maxwidth parameter in tufte.css...or at least interacts with this parameter.
If you make max-width larger, say 2000px or more then the issue goes away with higher resolutions. I'm not sure if this breaks other things, but hopefully this helps you start tracking things down. |
Thx, I cloned this repository and render here locally. I found the unexpected effect (with 2000px) of the content no more being centered in the screen. Content is to the left side now. Some mods. before building
|
thx for your format. I wanted the toc near content.
Is there any idea to fix the toc cut in half when clicking the sidebar toggle button?
For example, disappearing it completely.
The text was updated successfully, but these errors were encountered: