The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Dark/Light color switch Reply To: Dark/Light color switch

  1. on web-development: HTML, CSS and javaScript: there is no magic involved
  2. if being lazy, one has to get smart with it, like writing functions and so on ;)

Soooo maybe try to write a function in javascript that’s swaps every instance of “white” to “black” on button click or something, but I’m not going to go there. Personally I would much rather have the fined grained control with (declarative property-value pairs in) CSS, that is hard to beat IMO.