How to detect darkmode on Samsung Internet browser

2020-07-29 02:15发布

If this can be detected - is there a possibility to influence colors by CSS classes or JavaScript?

With the dark reader extension, it is also possible to submit adjustments. Hope that it is also possible here, if nothing else could change it.

1条回答
狗以群分
2楼-- · 2020-07-29 02:59

Samsung Internet does strange things with colors in night mode. If you’re aware of them, you can sort of workaround any issues. I’ve not found a way to detect it, though. The color filtering takes place late in the rendering process so APIs aren’t updated. The obvious methods (such as window.getComputedStyle) returns original colors.

查看更多
登录 后发表回答