Lines Matching +full:window +full:- +full:mode
4 https://github.com/jothepro/doxygen-awesome-css
8 Copyright (c) 2021 - 2023 jothepro
33 // https://www.apache.org/licenses/LICENSE-2.0.html
34 …-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FCBF00"><rect fi…
35 …-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FE9700"><rect fi…
36 static title = "Toggle Light/Dark Mode"
38 static prefersLightModeInDarkModeKey = "prefers-light-mode-in-dark-mode"
39 static prefersDarkModeInLightModeKey = "prefers-dark-mode-in-light-mode"
45 window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
61 const toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
65 … window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
77 $(window).resize(function(){
90 * @returns `true` for dark-mode, `false` for light-mode system preference
93 return window.matchMedia('(prefers-color-scheme: dark)').matches
97 * @returns `true` for dark-mode, `false` for light-mode user preference
125 document.documentElement.classList.add("dark-mode")
126 document.documentElement.classList.remove("light-mode")
129 document.documentElement.classList.remove("dark-mode")
130 document.documentElement.classList.add("light-mode")
157 customElements.define("doxygen-awesome-dark-mode-toggle", DoxygenAwesomeDarkModeToggle);