Fix: Dark-Mode JS-Fallback via matchMedia + html.dark Klasse (SW by-v955)
matchMedia-Listener setzt html.dark als Fallback für macOS 26 / Brave die prefers-color-scheme Media Query nicht korrekt weiterleiten
This commit is contained in:
parent
e548c43010
commit
10964c6509
4 changed files with 11 additions and 4 deletions
|
|
@ -4,6 +4,13 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<script>
|
||||
(function(){
|
||||
var mq = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
if (mq.matches) document.documentElement.classList.add('dark');
|
||||
mq.addEventListener('change', function(e){ document.documentElement.classList.toggle('dark', e.matches); });
|
||||
})();
|
||||
</script>
|
||||
<title>Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz</title>
|
||||
<meta name="description" content="Ban Yaro: Die kostenlose All-in-One Hunde-App für DACH. Tagebuch, Giftköder-Alarm, Training mit KI, Forum, Wurfbörse, Stammbaum, Inzucht-Check — DSGVO-konform, offline-fähig, ohne App Store.">
|
||||
<meta name="keywords" content="Hunde App, Hunde Community, Wurfbörse, Züchter, Welpen kaufen, Stammbaum Hund, Inzuchtkoeffizient, Hundezucht, Impfpass Hund, Giftköder Alarm, Gassi Community, Hundetraining App, Hunde Forum, Hunde KI, Hundefilm Datenbank, Welpen Marktplatz">
|
||||
|
|
@ -598,7 +605,7 @@
|
|||
.fade-up.visible { opacity: 1; transform: none; }
|
||||
|
||||
/* Dark Mode */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@media (prefers-color-scheme: dark), html.dark {
|
||||
:root {
|
||||
--bg: #141210;
|
||||
--surface: #1e1a16;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue