From e02c5b5930c2c9ba3e5423fe12e2ef0155017297 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:36 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- src/librustdoc/theme.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/librustdoc/theme.rs') diff --git a/src/librustdoc/theme.rs b/src/librustdoc/theme.rs index 722e01cd1..8c1acbd73 100644 --- a/src/librustdoc/theme.rs +++ b/src/librustdoc/theme.rs @@ -185,6 +185,9 @@ pub(crate) fn parse_selectors( while let Some(c) = iter.next() { match c { '{' => { + if selector.trim().starts_with(":root[data-theme") { + selector = String::from(":root"); + } let s = minifier::css::minify(selector.trim()).map(|s| s.to_string())?; parse_rules(content, s, iter, paths)?; selector.clear(); -- cgit v1.2.3