This module takes the fuss out of creating a theme with alternate stylesheets. The module takes care of outputting the appropriate markup and javascript, leaving only the stylesheet portion of the work up to the themer. Implementing this in your theme is a simple 2 step process:

  1. Create stylesheet(s) for each different style. Note that each stylesheet is added to the existing set of default stylesheets.
  2. Add a line to your theme's info file like
    styleswitcher[css][Style 2] = css/style2.css
    where "Style 2" is the title associated with you style, and css/style2.css is the location of the stylesheet, relative to the theme's path.

That's it. The module will present a block with links for each of these styles. It is much like the color module; in order to use it you must have the module enabled AND use a theme that implements it.

To read more about how alternate stylesheets are implemented in browsers, see this *old* A List Apart article.

Development supported by Annertech.

Downloads

Recommended releases

Version Downloads Date Links
6.x-1.0 tar.gz (9.81 KB) | zip (10.88 KB) 2012-Mar-07 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (8.84 KB) | zip (9.67 KB) 2012-Apr-20 Notes

Project Information


Maintainers for Style Switcher

  • alanburke - 4 commits
    last: 1 year ago, first: 1 year ago
  • zroger - 1 commit
    last: 4 years ago, first: 4 years ago

Issues for Style Switcher

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants
nobody click here