diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 9d7a07434..4d6f6596b 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -6,8 +6,7 @@ - + @@ -50,7 +49,11 @@ } else if (localStorage.theme === 'light') { document.documentElement.classList.remove('dark') } else { - document.documentElement.classList.add('dark') + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + document.documentElement.classList.add('dark') + } else { + document.documentElement.classList.remove('dark') + } } @auth window.Pusher = Pusher;