Skip to content

docs.rs css issues with rustdoc (responsiveness) #55883

Closed
@cynecx

Description

@cynecx

docs.rs and rustdoc aren't playing nicely together as we can see here (it's pretty much broken):

docsrs

To fix this, we should modify the selector from body > .sidebar to .rustdoc > .sidebar.

body > .sidebar {
height: 45px;
min-height: 40px;
margin: 0;
margin-left: -15px;
padding: 0 15px;
position: static;
z-index: 1;
}

After:

docsrs_after

By futher modifying docs.rs's css with something like:

@media (max-width: 700px) {
    div.rustdoc {
        padding-top: 0;
    }
    div.rustdoc .sidebar {
        padding-top: 0 !important;
    }
    #sidebar-filler {
        display: none;
    }
}

Final:

docsrs_final

Metadata

Metadata

Assignees

No one assigned

    Labels

    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