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

code area isn't scrollable on mobile (rustdoc) #105580

Closed
cynecx opened this issue Dec 11, 2022 · 2 comments · Fixed by #106690
Closed

code area isn't scrollable on mobile (rustdoc) #105580

cynecx opened this issue Dec 11, 2022 · 2 comments · Fixed by #106690
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@cynecx
Copy link
Contributor

cynecx commented Dec 11, 2022

This code area isn't scrollable (horizontal scrolling):

https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html

image

It seems like contain: layout on the <details> caused this. This got introduced here #102253 (cc @jsha).

We can make this work by making the parent <code> behave like a block but still being inline (inline-block).

Something like this should fix this:

pre > code {
    display: inline-block;
}

However, I am not quite sure whether this offsets the improvements made in #102253.

@compiler-errors compiler-errors added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 12, 2022
@jsha
Copy link
Contributor

jsha commented Dec 12, 2022

Thanks for reporting this! We should definitely fix it. I'm not sure if inline-block is the right way to fix it, but I can poke at it and see what I find.

@GuillaumeGomez GuillaumeGomez added the A-rustdoc-ui Area: rustdoc UI (generated HTML) label Jan 10, 2023
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 10, 2023

The bug was also present on desktop. The PR to fix it is #106690.

@bors bors closed this as completed in 8248f1d Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants