mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +08:00
a5dd21e94a
* docs: refactor config * docs(build): support dev without pre build * docs: disable sourcemap
11 lines
251 B
JavaScript
11 lines
251 B
JavaScript
;(() => {
|
|
const saved = localStorage.getItem('preferred_theme')
|
|
if (
|
|
saved === 'auto'
|
|
? window.matchMedia(`(prefers-color-scheme: dark)`).matches
|
|
: saved === 'dark'
|
|
) {
|
|
document.documentElement.classList.add('dark')
|
|
}
|
|
})()
|