From c194911458c5c447febebe09b0b685d36ad64af7 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 6 May 2024 14:01:07 +0200 Subject: [PATCH] revert --- resources/views/layouts/base.blade.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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;