Skip to content

Commit

Permalink
rustdoc: remove unused ID mainThemeStyle
Browse files Browse the repository at this point in the history
This was added in 003b2bc and used to build
the URL of the theme stylesheets. It isn't used any more, because
f9e1f6f changed it so that the URL was
supplied in a `<meta>` tag, which also provides the hashes of the files.
  • Loading branch information
notriddle committed Sep 7, 2023
1 parent 70c7e4d commit 00b7d70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,6 @@ fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> {
map.insert("crate-search-div".into(), 1);
// This is the list of IDs used in HTML generated in Rust (including the ones
// used in tera template files).
map.insert("mainThemeStyle".into(), 1);
map.insert("themeStyle".into(), 1);
map.insert("settings-menu".into(), 1);
map.insert("help-button".into(), 1);
Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/html/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<link rel="stylesheet" {#+ #}
href="{{static_root_path|safe}}{{files.normalize_css}}"> {# #}
<link rel="stylesheet" {#+ #}
href="{{static_root_path|safe}}{{files.rustdoc_css}}" {#+ #}
id="mainThemeStyle"> {# #}
href="{{static_root_path|safe}}{{files.rustdoc_css}}"> {# #}
{% if !layout.default_settings.is_empty() %}
<script id="default-settings" {#+ #}
{%~ for (k, v) in layout.default_settings ~%}
Expand Down

0 comments on commit 00b7d70

Please sign in to comment.