Allows administrators to inject CSS into the page output based on configurable rules. It's useful for adding simple CSS tweaks without modifying a site's official theme -- for example, a 'nighttime' color scheme could be added during certain hours. The CSS is added using Drupal's standard drupal_add_css() function and respects page caching, etc.

This module is definitely not a replacement for full-fledged theming, but it provides site administrators with a quick and easy way of tweaking things without diving into full-fledged theme hacking.

Please note: Creative individuals can use CSS to execute code on a client's browser, by injecting JS snippets in place of images and so on. Treat the 'Administer CSS Injector' permission carefully, as you would any other sensitive administrative tool; allowing untrusted individuals to use it is a security risk.

Related Projects:

  • The excellent Sweaver does a full WYSIWYG alteration of your look and feel, and will do custom CSS just like CSS Injector will.
  • JS Injector lets you inject javascript along the lines of this module.

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.7 tar.gz (14.44 KB) | zip (16.95 KB) 2011-Nov-17 Notes
6.x-1.4 tar.gz (15.1 KB) | zip (18.75 KB) 2010-Mar-08 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (13.36 KB) | zip (15.87 KB) 2011-Sep-05 Notes
6.x-1.x-dev tar.gz (11.72 KB) | zip (13.57 KB) 2011-Feb-25 Notes

Project Information


Maintainers for CSS Injector

  • rfay - 2 commits
    last: 22 weeks ago, first: 35 weeks ago
  • eaton - 13 commits
    last: 1 year ago, first: 4 years ago
  • add1sun - 2 commits
    last: 3 years ago, first: 3 years ago

Issues for CSS Injector

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Oldest open issue: 4 Mar 08