]> 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 aa08d608b1607637defbe8510be507eac40fc7d7..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 {
@@ -681,13 +688,16 @@ nav.sub {
        display: flex;
        align-items: center;
 }
-nav.sub form {
+.search-form {
+       position: relative;
+       display: flex;
+       height: 34px;
        flex-grow: 1;
 }
 .source nav.sub {
        margin: 0 0 15px 0;
 }
-.source nav.sub form {
+.source .search-form {
        margin-left: 32px;
 }
 
@@ -778,11 +788,6 @@ table,
        padding-right: 1.25rem;
 }
 
-.search-container {
-       position: relative;
-       display: flex;
-       height: 34px;
-}
 .search-results-title {
        margin-top: 0;
        white-space: nowrap;
@@ -856,15 +861,12 @@ so that we can apply CSS-filters to change the arrow color in themes */
           -webkit-appearance: textfield for search inputs. That
           causes rounded corners and no border on iOS Safari. */
        -webkit-appearance: none;
-       /* Override Normalize.css: we have margins and do
-        not want to overflow */
-       box-sizing: border-box !important;
        outline: none;
        border: 1px solid var(--border-color);
        border-radius: 2px;
        padding: 8px;
        font-size: 1rem;
-       width: 100%;
+       flex-grow: 1;
        background-color: var(--button-background-color);
        color: var(--search-color);
 }
@@ -874,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 {
@@ -1091,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,
@@ -1678,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;
@@ -1950,7 +1948,7 @@ in storage.js
                flex-direction: column;
        }
 
-       nav.sub form {
+       .search-form {
                align-self: stretch;
        }
 
@@ -1967,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;
 }
 
@@ -2021,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;
 }