More information about the Underscore mailing list

[_] Font / Colour changer recommendations

Tim Beadle tim.beadle at gmail.com
Thu Jan 24 11:31:27 GMT 2008

On 24/01/2008, Richard Davey <rich at corephp.co.uk> wrote:
> Not had to do one of these for a LOOONG time, but just wondered if
> anyone knew of a nice (ideally accessible) way to handle user
> controlled font sizing / colours and page background colours these
> days? I want to do it via JavaScript and will store the colours / sizes
> in a cookie.
>
> Before you all cry "why??!" it's to help out a site for a school that
> specialises in kids with dyslexia, and they benefit massively from being
> able to set their own colour contrasts and sizes, to help them read.

If you *have* to do it (seems like the case), then set up a set of
alternate stylesheets using <link rel="alternate stylesheet"... />,
then use DOM Scripting to read those link elements' content and
populate the switcher widget.

That's if you want pre-canned styles to choose from. If you want
people to be able to set individual sizes and colours, then that's a
whole 'nutha ball game.

Tim