1
Fork 0

Rollup merge of #63847 - GuillaumeGomez:system-theme-detection, r=kinnison

[rustdoc] Fix system theme detection

Fixes #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
This commit is contained in:
Mazdak Farrokhzad 2019-08-30 23:08:03 +02:00 committed by GitHub
commit 5f07ff7087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,7 +118,8 @@ function switchTheme(styleElem, mainStyleElem, newTheme, saveTheme) {
}
function getSystemValue() {
return getComputedStyle(document.documentElement).getPropertyValue('content');
var property = getComputedStyle(document.documentElement).getPropertyValue('content');
return property.replace(/\"\'/g, "");
}
switchTheme(currentTheme, mainTheme,