]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/static/css/rustdoc.css
Fix display of `<details>`/`<summary>` in doc blocks
[rust.git] / src / librustdoc / html / static / css / rustdoc.css
index 38e67c233d6981ec7ad05b0add3964567d9affd2..c7e1330e86acf558e4aa99a64bcdee176c3c1c44 100644 (file)
@@ -158,8 +158,8 @@ h1.fqn {
        Underlines elsewhere in the documentation break up visual flow and tend to invert
        section hierarchies. */
 h2,
-.top-doc h3,
-.top-doc h4 {
+.top-doc .docblock > h3,
+.top-doc .docblock > h4 {
        border-bottom: 1px solid;
 }
 h3.code-header {
@@ -897,7 +897,7 @@ table,
        margin-left: 0.25em;
        padding-left: 0.3125em;
        padding-right: 23px;
-       border: 0;
+       border: 1px solid;
        border-radius: 4px;
        outline: none;
        cursor: pointer;
@@ -1415,30 +1415,6 @@ pre.rust {
 #settings-menu.rotate > a img {
        animation: rotating 2s linear infinite;
 }
-#settings-menu #settings {
-       position: absolute;
-       right: 0;
-       z-index: 1;
-       display: block;
-       margin-top: 7px;
-       border-radius: 3px;
-       border: 1px solid;
-}
-#settings-menu #settings .setting-line {
-       margin: 0.6em;
-}
-/* This rule is to draw the little arrow connecting the settings menu to the gear icon. */
-#settings-menu #settings::before {
-       content: '';
-       position: absolute;
-       right: 11px;
-       border: solid;
-       border-width: 1px 1px 0 0;
-       display: inline-block;
-       padding: 4px;
-       transform: rotate(-45deg);
-       top: -5px;
-}
 
 #help-button {
        font-family: "Fira Sans", Arial, sans-serif;
@@ -1693,6 +1669,11 @@ details.rustdoc-toggle[open] > summary.hideme::after {
        content: "Collapse";
 }
 
+/* This is needed in docblocks to have the "▶" element to be on the same line. */
+.docblock summary > * {
+       display: inline-block;
+}
+
 /* Media Queries */
 
 @media (min-width: 701px) {
@@ -2010,7 +1991,6 @@ details.rustdoc-toggle[open] > summary.hideme::after {
 
        #crate-search {
                border-radius: 4px;
-               border: 0;
        }
 
        .docblock {