Skip to content

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

Closed
@cynecx

Description

@cynecx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions