]> 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 d0229bdb5f23c5f153fd8d7d76e390138078b171..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 {
@@ -1669,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) {