Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
cynecx opened this issue Nov 12, 2018 · 0 comments
Closed

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

cynecx opened this issue Nov 12, 2018 · 0 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@cynecx
Copy link
Contributor

cynecx commented Nov 12, 2018

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

@csmoe csmoe added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 12, 2018
kennytm added a commit to kennytm/rust that referenced this issue Nov 15, 2018
…illaumeGomez

Change sidebar selector to fix compatibility with docs.rs

Fix for rust-lang#55883.
pietroalbini added a commit to pietroalbini/rust that referenced this issue Nov 15, 2018
…illaumeGomez

Change sidebar selector to fix compatibility with docs.rs

Fix for rust-lang#55883.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants