diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-30 23:08:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-30 23:08:03 +0200 |
| commit | 5f07ff70870bc976ffdc691f75cf5a710f940c60 (patch) | |
| tree | 84e4bd630b54d1e04414ab0eacd7b804214905e3 /src | |
| parent | b76a5582273da26bf40e8eb4838860270e9e6e63 (diff) | |
| parent | fcbbf8d312c01b6287f4011f27ddb953c3182501 (diff) | |
| download | rust-5f07ff70870bc976ffdc691f75cf5a710f940c60.tar.gz rust-5f07ff70870bc976ffdc691f75cf5a710f940c60.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/static/storage.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/storage.js b/src/librustdoc/html/static/storage.js index 9d30e7ee79b..40a6a156972 100644 --- a/src/librustdoc/html/static/storage.js +++ b/src/librustdoc/html/static/storage.js @@ -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, |
