Skip to content

Commit 5f07ff7

Browse files
authored
Rollup merge of rust-lang#63847 - GuillaumeGomez:system-theme-detection, r=kinnison
[rustdoc] Fix system theme detection Fixes rust-lang#63830 The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue. cc @fenhl r? @kinnison
2 parents b76a558 + fcbbf8d commit 5f07ff7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/storage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function switchTheme(styleElem, mainStyleElem, newTheme, saveTheme) {
118118
}
119119

120120
function getSystemValue() {
121-
return getComputedStyle(document.documentElement).getPropertyValue('content');
121+
var property = getComputedStyle(document.documentElement).getPropertyValue('content');
122+
return property.replace(/\"\'/g, "");
122123
}
123124

124125
switchTheme(currentTheme, mainTheme,

0 commit comments

Comments
 (0)