Skip to content

Commit 6c8969c

Browse files
Add open attribute on details which are supposed to be open by default instead of opening them with JS
1 parent 9b44c4b commit 6c8969c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/librustdoc/html/render/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ fn render_impl(
13051305
if let Some(use_absolute) = use_absolute {
13061306
write!(
13071307
w,
1308-
"<details class=\"rustdoc-toggle implementors-toggle\">\
1308+
"<details class=\"rustdoc-toggle implementors-toggle\" open>\
13091309
<summary>\
13101310
<h3 id=\"{}\" class=\"impl\"{}>\
13111311
<code class=\"in-band\">",
@@ -1334,7 +1334,7 @@ fn render_impl(
13341334
} else {
13351335
write!(
13361336
w,
1337-
"<details class=\"rustdoc-toggle implementors-toggle\">\
1337+
"<details class=\"rustdoc-toggle implementors-toggle\" open>\
13381338
<summary>\
13391339
<h3 id=\"{}\" class=\"impl\"{}>\
13401340
<code class=\"in-band\">{}</code>",

src/librustdoc/html/static/main.js

-2
Original file line numberDiff line numberDiff line change
@@ -1429,8 +1429,6 @@ function hideThemeButtonState() {
14291429
} else if (nextTagName !== "DETAILS") {
14301430
e.nextElementSibling.style.display = "block";
14311431
}
1432-
} else if (e.tagName === "DETAILS") {
1433-
e.open = true;
14341432
}
14351433
});
14361434
}

0 commit comments

Comments
 (0)