]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/static/css/rustdoc.css
rustdoc: remove unused mobile CSS `.rustdoc { padding-top: 0 }`
[rust.git] / src / librustdoc / html / static / css / rustdoc.css
index 1cc954a98dc3797d06c3b6ef687357ec719397c1..a18fff3bb14749931944d5941ba5eaa7eda72536 100644 (file)
@@ -163,9 +163,6 @@ h1.fqn {
        padding-bottom: 6px;
        margin-bottom: 15px;
 }
-#toggle-all-docs {
-       text-decoration: none;
-}
 /* The only headings that get underlines are:
         Markdown-generated headings within the top-doc
         Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc)
@@ -209,7 +206,7 @@ ul.all-items {
        font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif;
 }
 
-a#toggle-all-docs,
+#toggle-all-docs,
 a.anchor,
 .small-section-header a,
 #source-sidebar a,
@@ -299,6 +296,16 @@ button {
        padding: 1px 6px;
 }
 
+button#toggle-all-docs {
+       padding: 0;
+       background: none;
+       border: none;
+       cursor: pointer;
+       /* iOS button gradient: https://stackoverflow.com/q/5438567 */
+       -webkit-appearance: none;
+       opacity: 1;
+}
+
 /* end tweaks for normalize.css 8 */
 
 .rustdoc {
@@ -493,9 +500,7 @@ ul.block, .block li {
 .sidebar h2 {
        overflow-wrap: anywhere;
        padding: 0;
-       margin: 0;
-       margin-top: 0.7rem;
-       margin-bottom: 0.7rem;
+       margin: 0.7rem 0;
 }
 
 .sidebar h3 {
@@ -803,10 +808,8 @@ table,
 }
 #crate-search {
        min-width: 115px;
-       padding: 0;
        /* keep these two in sync with "@-moz-document url-prefix()" below */
-       padding-left: 4px;
-       padding-right: 23px;
+       padding: 0 23px 0 4px;
        /* prevents the <select> from overflowing the containing div in case it's shrunk */
        max-width: 100%;
        /* contents can overflow because of max-width limit, then show ellipsis */
@@ -873,13 +876,10 @@ so that we can apply CSS-filters to change the arrow color in themes */
 
 .search-results {
        display: none;
-       padding-bottom: 2em;
 }
 
 .search-results.active {
        display: block;
-       /* prevent overhanging tabs from moving the first result */
-       clear: both;
 }
 
 .search-results .desc > span {
@@ -1090,7 +1090,7 @@ pre.rust .bool-val {
 pre.rust .self {
        color: var(--code-highlight-self-color);
 }
-pre.rust .attribute {
+pre.rust .attr {
        color: var(--code-highlight-attribute-color);
 }
 pre.rust .macro,
@@ -1677,7 +1677,6 @@ in storage.js
        }
 
        .rustdoc {
-               padding-top: 0px;
                /* Sidebar should overlay main content, rather than pushing main content to the right.
                   Turn off `display: flex` on the body element. */
                display: block;
@@ -1719,7 +1718,6 @@ in storage.js
                /* Hide the sidebar offscreen while not in use. Doing this instead of display: none means
                   the sidebar stays visible for screen readers, which is useful for navigation. */
                left: -1000px;
-               margin-left: 0;
                margin: 0;
                padding: 0;
                z-index: 11;
@@ -1772,9 +1770,7 @@ in storage.js
        .mobile-topbar .logo-container > img {
                max-width: 35px;
                max-height: 35px;
-               margin-left: 20px;
-               margin-top: 5px;
-               margin-bottom: 5px;
+               margin: 5px 0 5px 20px;
        }
 
        .mobile-topbar {
@@ -1969,24 +1965,26 @@ in storage.js
        }
 }
 
-.method-toggle > summary,
 .implementors-toggle > summary,
 .impl,
 #implementors-list > .docblock,
 .impl-items > section,
-.methods > section
+.impl-items > .rustdoc-toggle > summary,
+.methods > section,
+.methods > .rustdoc-toggle > summary
 {
        margin-bottom: 0.75em;
 }
 
-.method-toggle[open]:not(:last-child),
+.impl-items > .rustdoc-toggle[open]:not(:last-child),
+.methods > .rustdoc-toggle[open]:not(:last-child),
 .implementors-toggle[open]:not(:last-child) {
        margin-bottom: 2em;
 }
 
-#trait-implementations-list .method-toggle:not(:last-child),
-#synthetic-implementations-list .method-toggle:not(:last-child),
-#blanket-implementations-list .method-toggle:not(:last-child) {
+#trait-implementations-list .impl-items > .rustdoc-toggle:not(:last-child),
+#synthetic-implementations-list .impl-items > .rustdoc-toggle:not(:last-child),
+#blanket-implementations-list .impl-items > .rustdoc-toggle:not(:last-child) {
        margin-bottom: 1em;
 }
 
@@ -2023,45 +2021,36 @@ in storage.js
        padding-bottom: 0;
 }
 
-.scraped-example .code-wrapper .prev {
+.scraped-example .code-wrapper .next,
+.scraped-example .code-wrapper .prev,
+.scraped-example .code-wrapper .expand {
        position: absolute;
        top: 0.25em;
-       right: 2.25em;
-       z-index: 100;
+       z-index: 1;
        cursor: pointer;
 }
-
+.scraped-example .code-wrapper .prev {
+       right: 2.25em;
+}
 .scraped-example .code-wrapper .next {
-       position: absolute;
-       top: 0.25em;
        right: 1.25em;
-       z-index: 100;
-       cursor: pointer;
 }
-
 .scraped-example .code-wrapper .expand {
-       position: absolute;
-       top: 0.25em;
        right: 0.25em;
-       z-index: 100;
-       cursor: pointer;
 }
 
-.scraped-example:not(.expanded) .code-wrapper:before {
+.scraped-example:not(.expanded) .code-wrapper:before,
+.scraped-example:not(.expanded) .code-wrapper:after {
        content: " ";
        width: 100%;
        height: 5px;
        position: absolute;
-       z-index: 100;
+       z-index: 1;
+}
+.scraped-example:not(.expanded) .code-wrapper:before {
        top: 0;
 }
-
 .scraped-example:not(.expanded) .code-wrapper:after {
-       content: " ";
-       width: 100%;
-       height: 5px;
-       position: absolute;
-       z-index: 100;
        bottom: 0;
 }