PHP CSS Style Switcher

Last night I decided to take another look at the idea of providing a way for visitors to this site to be able to change the color scheme. I had the “grey” look from Grey Tuesday, and a couple of other CSS files I’d created, so it was time to look for a style switcher.

My first stop was the Scripty Goddess site. Their site was one of the first that I recall as offering users the ability to choose from a variety of preset formats. Indeed, I was not disappointed, as a search for “switcher” yielded two excellent links to techniques for providing this functionality.

Both solutions are based on PHP, which is key, as it obviates the need for javascript and so will work even for folks (JD) who browse with javascript disabled. On the other hand, if one wants their preferences to stick on return visits, then cookies must be allowed, so nothing is perfect.

Styleswitcher is a very powerful, full-featured solution. It supports complex usage of CSS style sheets that I don’t need (yet) and has a bit of a steeper learning and deployment curve than the solution I’m currently using.

The other solution, phpswitch from A List Apart, met my needs quite well. It’s a simple, easy to deploy solution that I was able to setup with just a couple hours work.

So, if you look at the upper right of the main page, you will see a control that allows you to change the look of this site. The actual styles are still under development, but most look at least OK. Go ahead, try it out!