Installing sass and Compass for editing CSS

Community Media Theme is now using sass, a more efficient way to write CSS. The files to edit are the .scss files in the /sass sub-folder. These will then be compiled to the normal .css files that are presented to the browser. To do this you will need Compass installed on your server.

  1. To install Compass you will need to have Ruby installed. If it's not installed on your server, the easiest way (if you are on Linux) is to install RailsReady: https://github.com/joshfng/railsready
  2. After that, run sudo gem install compass
  3. Then go to /sites/all/themes/cm_theme/cm_theme_zen and run compass watch. Any changes you make in a .scss file will now be compiled to .css.

Overriding CSS for minor tweaks with CSS Injector

Due to the Sass based approach taken in the 2.x Zen-based version of the CM_Theme, it would be inadvisable to add CSS directly to .css files. Instead the use of CSS injector can be useful for making small changes to accomplish things like changing link colors, styling custom blocks, etc. Major changes, however should be made in a sub sub theme and if these changes are thought to be able to benefit other stations, then requested for inclusion in an update to the theme. Those requests can be made in the CM theme issue queue and css submitted as a patch.