3

Is there any possible way to add styles to Samsung Internet Dark Mode?

We are trying to modify some colors on our website that Samsung Internet Browser defaults to on Dark Mode.

Currently, prefers-color-scheme is not supported on Samsung Internet. However, they have an integrated browser with Dark Mode support as of February 24th, 2020.

        html, body{
            height: 100%;
        }
        .box{
            min-width: 100%;
            min-height: 100%;
            display: none;
        }
        .default {
            background-color: gray;
            display: block;
        }
        @media (prefers-color-scheme: light) {
            .light {
                background-color: #fff;
                color: #000;
                display: block;
            }
            .default{
                display: none;
            }
        }
        @media (prefers-color-scheme: dark) {
            .dark {
                background-color: #000;
                color: #fff;
                display: block;
            }
            .default{
                display: none;
            }
        }
<div class="box dark">Dark mode detected.</div>
<div class="box light">Light mode detected.</div>
<div class="box default">Default, no support for dark mode or light mode detected.</div>
Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
ahinkle
  • 2,117
  • 3
  • 29
  • 58
  • Similar question with no answer (comment added to link the questions when there is an answer): [How to detect darkmode on Samsung Internet browser?](https://stackoverflow.com/q/58646758/215552) – Heretic Monkey Apr 23 '20 at 16:06
  • It seems that it got a Night Mode with version 6.2, but it doesn’t mention any support for alternative methods to `prefers-color-scheme`: I guess it’s just a One UI 2 feature. – Federico Moretti Apr 23 '20 at 16:15
  • 1
    The latest update to Samsung Internet has changed the dark mode algorithm. But it still doesn't handle `prefers-color-scheme` correctly. :( – PM 2Ring Feb 13 '23 at 12:29

0 Answers0