Dark mode using 'invert' does not work on Firefox

 Implementing 'dark mode' with 'invert' on the 'html' tag does not seem to work on the old Firefox used in my local libraries.


This version of Firefox does not invert the background. This Firefox just inverts the elements you add. The Firefox developers feel they are following the specification.


Using 'invert' when there is an 'overlay' scrollbar on Chrome sometimes makes the scrollbar disappear. I am using the last version of Chrome on Windows7. I understand 'overlay' scrollbars have been removed from the latest versions of Chrome. Of course, a dark scrollbar on a black background does not make sense. So I would need to use 'color-scheme' to change the color of the scrollbar. But 'invert' does not work well with 'color-scheme'. I could not set the colour of this 'overlay' scrollbar with properties like '-webkit-scrollbar-thumb'. 


So I am going to have to implement 'dark mode' by setting the colours one by one. 


In my game I darken background colours by reducing the 'red', 'green' and 'blue' values by a half. I lighten text colours by increasing the 'red', 'green' and 'blue' values by a half of '255' minus the value. 


In my game I am going to offer the choice of implementing 'dark mode' by changing all the colours one-by-one or by using 'invert'. I will put in a warning that 'invert' may not work on Firefox. I use 'hue-rotate(180deg)' with 'invert'.  This keeps the colours more or less the same. but I also 'invert' some element again to retain their true colours.


The public libraries in a neighbouring town do not have Firefox installed at all and just offer Edge and Chrome on Windows 10.


There are more tips at: bbingo.xyz/t

Comments

Popular posts from this blog

webkit-tap-highlight-color in CSS

Steve Jobs quotes