How to detect darkmode on Samsung Internet browser?

十年热恋 提交于 2020-05-26 09:54:07

问题


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:


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.



来源:https://stackoverflow.com/questions/58646758/how-to-detect-darkmode-on-samsung-internet-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!