Skip to content

Commit

Permalink
Add open attribute on details which are supposed to be open by defaul…
Browse files Browse the repository at this point in the history
…t instead of opening them with JS
  • Loading branch information
GuillaumeGomez committed Apr 26, 2021
1 parent 9b44c4b commit 6c8969c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ fn render_impl(
if let Some(use_absolute) = use_absolute {
write!(
w,
"<details class=\"rustdoc-toggle implementors-toggle\">\
"<details class=\"rustdoc-toggle implementors-toggle\" open>\
<summary>\
<h3 id=\"{}\" class=\"impl\"{}>\
<code class=\"in-band\">",
Expand Down Expand Up @@ -1334,7 +1334,7 @@ fn render_impl(
} else {
write!(
w,
"<details class=\"rustdoc-toggle implementors-toggle\">\
"<details class=\"rustdoc-toggle implementors-toggle\" open>\
<summary>\
<h3 id=\"{}\" class=\"impl\"{}>\
<code class=\"in-band\">{}</code>",
Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,6 @@ function hideThemeButtonState() {
} else if (nextTagName !== "DETAILS") {
e.nextElementSibling.style.display = "block";
}
} else if (e.tagName === "DETAILS") {
e.open = true;
}
});
}
Expand Down

0 comments on commit 6c8969c

Please sign in to comment.