From 07a86aa8793bfa11fd6d8414bf0ccc619dee0fcc Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 27 May 2024 07:26:03 +0300 Subject: [PATCH] css/main.scss: fix adblocker detection for dark themes --- css/main.scss | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/css/main.scss b/css/main.scss index 0751e96..9d616d2 100644 --- a/css/main.scss +++ b/css/main.scss @@ -56,13 +56,24 @@ $on-laptop: 800px; color-scheme: dark light; } -// This is the missing content blocker detection -.ftf-dma-note { - // It doesn't want to turn dark and still uses text colors more suitable - // for dark. - color-scheme: only light; - //display: block !important; - //pointer-events: all !important; +// Overrides for dark themes +@media (prefers-color-scheme: dark) { + // Adblocker detection) + .ftf-dma-note { + color-scheme: only dark !important; + color: #ffb700 !important; + background-color: #000000 !important; + } +} + +// Overrides for light themes +@media (prefers-color-scheme: light) { + // Adblocker detection + .ftf-dma-note { + color-scheme: only light !important; + color: #000000 !important; + background-color: #ffffff !important; + } } // Import partials from `sass_dir` (defaults to `_sass`)