Progressively built on the fly, to answer this forum post on Our Umbraco.
The macro must have a mode
parameter (type: text
) in which you specify either link or switcher as the value - link creates the <link rel="stylesheet" href="stylesheet.css">
tag, switcher renders a set of links for switching the stylesheet.
The possible stylesheets are configured in the macro itself, and the chosen stylesheet is stored in a cookie so the site remembers the choice.
(It doesn't seem to be possible to specify the order of files in this Gist, so that's why the explanation comes before the code it explains :-)