-
Notifications
You must be signed in to change notification settings - Fork 13k
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
RustDoc header collapse toggles are heinously misaligned #45158
Comments
Actually I see this is really a "description collapse" toggle and it mirrors one top-right by the source button. For further amusement, these toggles can get out of sync. Maybe the annoying misaligned one on the left should be removed? |
Nah, the one on the left only folds the crate description - it mirrors the top-level description of things like structs or traits, which stick their top-level docs there. The one on the top-right is to toggle everything on the page, which is more useful when there's more than one docblock to toggle. cc @GuillaumeGomez - this should be a fairly small CSS fix, right? |
The difficulty is that the content is just generic content; it could start with an With the way it’s all structured, there’s no way to fix this with CSS alone. The toggle is in a previous sibling of the content element, so you can’t target it with CSS depending on what the content starts with. The toggle would need a class added to it to signify what the content starts with, either in the rustdoc code or through JavaScript. |
I'm not sure if this is such a good idea... |
The A couple of things happen if the doc comment starts with a header. This misalignment, and if you hover over the header, the collapse icon and the header's § icon overlap too. |
@bluss: I don't see what overlap issue you're talking about... |
@GuillaumeGomez The From URL: https://doc.rust-lang.org/nightly/std/ |
Oh I see. I'll write a fix when I get time. |
…tMisdreavus Fix title heading overlap in rust doc Fixes rust-lang#45158. To be noted that this margin only appears when a title is the first element. <img width="1440" alt="screen shot 2017-10-22 at 16 08 44" src="https://user-images.githubusercontent.com/3050060/31862746-6411070e-b743-11e7-9a75-4159e1f7f1d6.png"> r? @rust-lang/docs
@QuietMisdreavus posted a screenshot of some RustDoc updates. In it, a header collapse button is shown. It is heinously out of alignment with the header text. I will never be able to unsee this and this bug will follow me to the end of my days.
Please can some CSS wizard fix the alignment of these widgets so that I will once again be able to use Rust documentation without involuntarily twitching each time a collapse toggle pops up.
The text was updated successfully, but these errors were encountered: