]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/static/css/rustdoc.css
Fix item info display
[rust.git] / src / librustdoc / html / static / css / rustdoc.css
index 66dfd2fac84c6df91334ce262eba26ce091f0bd0..e7a92e638467deb74d6f1d37141624bfe59e5eb4 100644 (file)
@@ -247,6 +247,9 @@ code, pre, a.test-arrow {
 pre {
        padding: 14px;
 }
+.type-decl pre {
+       overflow-x: auto;
+}
 
 .source .content pre {
        padding: 20px;
@@ -435,7 +438,7 @@ nav.sub {
        border-bottom-left-radius: 5px;
 }
 
-.rustdoc:not(.source) .example-wrap > pre.rust {
+.rustdoc:not(.source) .example-wrap > pre:not(.line-number) {
        width: 100%;
        overflow-x: auto;
 }
@@ -918,6 +921,9 @@ body.blur > :not(#help) {
        padding: 0 20px 20px 17px;;
 }
 
+.item-info .stab {
+       display: table;
+}
 .stab {
        border-width: 1px;
        border-style: solid;
@@ -1631,15 +1637,18 @@ details.undocumented[open] > summary::before {
                display: none;
        }
 
+       /* We do NOT hide this element so that alternative device readers still have this information
+          available. */
        .sidebar-elems {
                position: fixed;
                z-index: 1;
-               left: 0;
                top: 45px;
                bottom: 0;
+               width: 246px;
+               /* We move the sidebar to the left by its own width so it doesn't appear. */
+               left: -246px;
                overflow-y: auto;
                border-right: 1px solid;
-               display: none;
        }
 
        .sidebar > .block.version {
@@ -1726,9 +1735,9 @@ details.undocumented[open] > summary::before {
                width: calc(100% + 30px);
        }
 
-       .show-it {
-               display: block;
-               width: 246px;
+       .show-it, .sidebar-elems:focus-within {
+               z-index:  2;
+               left: 0;
        }
 
        .show-it > .block.items {