DEV Community

Discussion on: The Best Way To Dark Mode Your Website In My Opinion.

Collapse
 
ctrl_alt_aldr profile image
Christian | πŸ§‘πŸΌβ€πŸ’»

Neat approach, I much prefer the CSS Variables method myself though as it means I don't need to juggle two (or more) colour themed CSS files

Collapse
 
zxcodes profile image
Mohammed Farmaan.

Yeah sure. It just depends on the user's preference.😁

Collapse
 
chiubaca profile image
Alex Chiu

second this, css variables can help reduce a lot of duplication and should therefore scale better.

Collapse
 
td204 profile image
Terry

Too bad you still need a fallback for IE11.

Collapse
 
ctrl_alt_aldr profile image
Christian | πŸ§‘πŸΌβ€πŸ’»

Yes, for those that need to support IE11 it's a shame - I personally don't however, so I'm happy going forward with CSS Variables 😊

Thread Thread
 
richardsprins profile image
Richard S Prins Jr. • Edited

Same, its to the point either IE needs to put in the necessary work to be more compatible with the rest of the world or just deprecated itself altogether. Its been a thorn in every web devs heel for decades now to deal with IE compatibility. Safari has done whats necessary to make things easier, why can't Microsoft. Edge was their answer to this and it made nothing any easier.

Thread Thread
 
perpetualwar profile image
SrΔ‘an MeΔ‘o • Edited

Devs just need to stop supporting IE altogether. Its ridiculous requirement in 2020 that someone needs IE.

Just let it die.

Collapse
 
sirajulm profile image
Sirajul Muneer

Even bootstrap 5 is dropping support for IE11. It is time to move on. There is no meaning doing extra work to support an old browser.

Thread Thread
 
td204 profile image
Terry

Yes, please. But commercially this is not (yet) an option in the real business world.

Thread Thread
 
sirajulm profile image
Sirajul Muneer

That is were progressive enhancement comes handy. You need not always try to figure out a way for fitting a new feature in an old browser. If the browser dont support it, and if it doesnt add any functional and business value, dont bother providing the same for an old browser. Show website without dark mode in IE.

Thread Thread
 
opauloh profile image
Paulo Henrique

Totally agree, that is to use sense, and careful choose what you are gonna support or not, not being a religious in every decision