Featherweb Blog

Blog index

dan-christian padure">

Thanks to WebMary @ Codepen


Click the buttons to change style

This is great: after a weekend of frustration, not finding a small and simple solution for a theme switcher, I stumbled upon this one by Webmary. Just what I was looking for, some code to handle switching between my mini color stylesheets. It has some javascript, two short lines of it...very clear and efficient coding. The buttons above are just the raw form, they will be beautified and moved out of the way. It's just that I couldn't wait to show you this nice solution. I've seen several nice ones lately, but this one actually works...

Meanwhile I received a friendly email from Alexander Sandberg, the author of the 'unlimitted', CSS only, css switcher, see former post. He gave me a link to a great tutorial on CSS properties / variables. Not so easy but fascinating stuff. I'll need to have a word with my two brain cells about their family planning...but this CSS only approach is really worth following.

I'll also spend some time finetuning the actual colors in the themes. My father was color blind and people in my environment tell me I inherited some of it. My father could not differentiate between red and green traffic lights, Making it very special that he died a natural death..
I am open to suggestions for the colors. I keep thinking a warm dark grey would be nice, and something with "sand" color background. And maybe drop yellow...

So now we have the dirty-hands B.U.T.S approach - bert's unique theme switcher :) - and this css-swap to choose between.