-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Give sidebar a z-index #88702
Give sidebar a z-index #88702
Conversation
Some changes occurred in HTML/CSS/JS. |
r? @CraftSpider (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
The error doesn't seem relevant... |
I don't think this is the right fix. The content shouldn't be larger that the container. The scrollbar should be on the |
Many elements could cause the overflow, not just a table. E.g. a very long inline code block could cause the content to overflow too, but you cannot put a scrollbar on it because it isn't and shouldn't be For this particular case a scrollbar on the table might be desirable, but in general style still shouldn't break when content overflows. |
Agreed. I'm planning to wrap the .docblock * {
max-width: 100%;
overflow-x: scroll;
} That should prevent most issues. |
Should be |
This ensures that sidebar does not overlap with content when horizontal scrollbar is present.
76f4e97
to
379b5f0
Compare
I opened #88742 so I think this PR can be closed. To give a few more information about why I don't think this is a good idea: hiding the issue (but making the scrolled content go under the sidebar) doesn't fix the original problem. Instead of making the whole doc block scroll, I prefer to limit it to the element having a too big width directly. Thanks in any case for bringing this issue to our attention! :) |
No I think both PRs should be merged. They tackle different problems:
As I said earlier, it not feasible in general to prevent overflow from happening at all. Have `<insert a very long symbol name here>` Note that's an inline code block so it doesn't make sense to put a scroll bar on it. in the doc still shouldn't break the style and cause the overlap to happen. |
Oh I miss the |
…ks, r=nbdd0121 Fix table in docblocks "Overwrite" of rust-lang#88702. Instead of adding a z-index to the sidebar (which only hides the issue, doesn't fix it), I wrap `<table>` elements inside a `<div>` and limit all chidren of `.docblock` elements' width to prevent having the scrollbar on the whole doc block. ![Screenshot from 2021-09-08 15-11-24](https://user-images.githubusercontent.com/3050060/132515740-71796515-e74f-429f-ba98-2596bdbf781c.png) Thanks `@nbdd0121` for `overflow-x: auto;`. ;) r? `@notriddle`
This ensures that sidebar does not overlap with content when horizontal scrollbar is present.
The overlap is visible in https://docs.rs/ndarray/0.15.3/ndarray/struct.ArrayBase.html.
Discovered by @m13253.