mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 05:26:47 +00:00
Update rustdoc_css_themes.rs
to take into account new selectors
This commit is contained in:
parent
8f9d93bf57
commit
2815edc671
@ -74,8 +74,11 @@ fn compare_themes<'a>(
|
||||
(noscript_css_line_number, noscript_css_line),
|
||||
) in rustdoc_css_lines.zip(noscript_css_lines)
|
||||
{
|
||||
if noscript_css_line.starts_with(":root {")
|
||||
&& rustdoc_css_line.starts_with(&format!(r#":root[data-theme="{name}"] {{"#))
|
||||
if noscript_css_line.starts_with(":root, :root:not([data-theme]) {")
|
||||
&& (rustdoc_css_line.starts_with(&format!(r#":root[data-theme="{name}"] {{"#))
|
||||
|| rustdoc_css_line.starts_with(&format!(
|
||||
r#":root[data-theme="{name}"], :root:not([data-theme]) {{"#
|
||||
)))
|
||||
{
|
||||
// selectors are different between rustdoc.css and noscript.css
|
||||
// that's why they both exist: one uses JS, the other uses media queries
|
||||
|
Loading…
Reference in New Issue
Block a user