alternateStyles.js

While this isn’t new code from me, I got round to cleaning it up and making it suitable for "open sourcing". This javascript allows the developer of a website to assign optional css styles to any element(s), which the user can then choose.

Jakob Nielsen said back in 2002 in his Alertbox Let Users Control Font Size

"Consider adding a button that loads an alternate style sheet with really big font sizes if most of your site’s visitors are senior citizens or low-vision users. Few users know how to find or use the built-in font size feature in current browsers, and adding such a button within your pages will help users easily increase text size. However, because every extra feature takes away from the rest of the page, I don’t recommend such a button for mainstream websites."

While not an ‘alternate style sheet’, it is an ‘alternate style’ and one of the examples I’ve included does exactly this. Head over to the alternateStyles.js page for examples, and source code.

Tags: ,

Leave a Reply

« Back to text comment