Closed gbowne1 closed 2 years ago
Add a Bootstrap 5.2 & FontAwesome 6.1.2 Toggle Button
Possibly use:
and a bootstrap bg-dark & bg-light class
Switch the page theme to dark or light
No response
Or something like:
https://stackoverflow.com/questions/50840168/how-to-detect-if-the-os-is-in-dark-mode-in-browsers
From the answer in the above link:
/ Light mode / @media (prefers-color-scheme: light) { body { background-color: white; color: black; } }
/ Dark mode / @media (prefers-color-scheme: dark) { body { background-color: black; color: white; } }
Prerequisites
Describe the Feature Request
Add a Bootstrap 5.2 & FontAwesome 6.1.2 Toggle Button
Possibly use:
and a bootstrap bg-dark & bg-light class
Describe the Use Case
Switch the page theme to dark or light
Describe Preferred Solution
No response
Describe Alternatives
Or something like:
https://stackoverflow.com/questions/50840168/how-to-detect-if-the-os-is-in-dark-mode-in-browsers
Related Code
From the answer in the above link:
/ Light mode / @media (prefers-color-scheme: light) { body { background-color: white; color: black; } }
/ Dark mode / @media (prefers-color-scheme: dark) { body { background-color: black; color: white; } }
Additional Information
No response