rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle
This swaps things around so that the class that gets used more often has the shorter name.
This commit is contained in:
parent
0b90256ada
commit
1d328de3ec
19 changed files with 117 additions and 117 deletions
|
|
@ -513,7 +513,7 @@ fn document_full_inner(
|
|||
debug!("Doc block: =====\n{}\n=====", s);
|
||||
if is_collapsible {
|
||||
w.write_str(
|
||||
"<details class=\"rustdoc-toggle top-doc\" open>\
|
||||
"<details class=\"toggle top-doc\" open>\
|
||||
<summary class=\"hideme\">\
|
||||
<span>Expand description</span>\
|
||||
</summary>",
|
||||
|
|
@ -1514,7 +1514,7 @@ fn render_impl(
|
|||
let toggled = !doc_buffer.is_empty();
|
||||
if toggled {
|
||||
let method_toggle_class = if item_type.is_method() { " method-toggle" } else { "" };
|
||||
write!(w, "<details class=\"rustdoc-toggle{}\" open><summary>", method_toggle_class);
|
||||
write!(w, "<details class=\"toggle{}\" open><summary>", method_toggle_class);
|
||||
}
|
||||
match &*item.kind {
|
||||
clean::MethodItem(..) | clean::TyMethodItem(_) => {
|
||||
|
|
@ -1730,7 +1730,7 @@ fn render_impl(
|
|||
close_tags.insert_str(0, "</details>");
|
||||
write!(
|
||||
w,
|
||||
"<details class=\"rustdoc-toggle implementors-toggle\"{}>",
|
||||
"<details class=\"toggle implementors-toggle\"{}>",
|
||||
if rendering_params.toggle_open_by_default { " open" } else { "" }
|
||||
);
|
||||
write!(w, "<summary>")
|
||||
|
|
@ -2999,7 +2999,7 @@ fn render_call_locations(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Ite
|
|||
if it.peek().is_some() {
|
||||
write!(
|
||||
w,
|
||||
"<details class=\"rustdoc-toggle more-examples-toggle\">\
|
||||
"<details class=\"toggle more-examples-toggle\">\
|
||||
<summary class=\"hideme\">\
|
||||
<span>More examples</span>\
|
||||
</summary>\
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ fn should_hide_fields(n_fields: usize) -> bool {
|
|||
fn toggle_open(w: &mut Buffer, text: impl fmt::Display) {
|
||||
write!(
|
||||
w,
|
||||
"<details class=\"rustdoc-toggle type-contents-toggle\">\
|
||||
"<details class=\"toggle type-contents-toggle\">\
|
||||
<summary class=\"hideme\">\
|
||||
<span>Show {}</span>\
|
||||
</summary>",
|
||||
|
|
@ -733,7 +733,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
|
|||
let toggled = !content.is_empty();
|
||||
if toggled {
|
||||
let method_toggle_class = if item_type.is_method() { " method-toggle" } else { "" };
|
||||
write!(w, "<details class=\"rustdoc-toggle{method_toggle_class}\" open><summary>");
|
||||
write!(w, "<details class=\"toggle{method_toggle_class}\" open><summary>");
|
||||
}
|
||||
write!(w, "<section id=\"{}\" class=\"method has-srclink\">", id);
|
||||
render_rightside(w, cx, m, t, RenderMode::Normal);
|
||||
|
|
@ -1840,7 +1840,7 @@ fn document_non_exhaustive(w: &mut Buffer, item: &clean::Item) {
|
|||
if item.is_non_exhaustive() {
|
||||
write!(
|
||||
w,
|
||||
"<details class=\"rustdoc-toggle non-exhaustive\">\
|
||||
"<details class=\"toggle non-exhaustive\">\
|
||||
<summary class=\"hideme\"><span>{}</span></summary>\
|
||||
<div class=\"docblock\">",
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue