Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/utils/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ pub(crate) fn rewrite_lol(
Ok(())
};

// Append `vendored.css` before the first stylesheet (rustdoc's first stylesheet is `normalize.css`).
// Append `vendored.css` before `rustdoc.css`, so that the duplicate copy of
// `normalize.css` will be overridden by the later version.
let first_stylesheet_handler = |head: &mut Element| {
head.before(&tera_vendored_css, ContentType::Html);

Expand All @@ -74,7 +75,7 @@ pub(crate) fn rewrite_lol(
let (head_selector, body_selector, first_stylesheet_selector) = (
"head".parse().unwrap(),
"body".parse().unwrap(),
"link[type='text/css'][href*='normalize']".parse().unwrap(),
"link[type='text/css'][href*='rustdoc']".parse().unwrap(),
);
let element_content_handlers = vec![
(
Expand Down