This brief guide will demonstrate how to setup our themes to support a local.css file where custom CSS rules and modifications can be placed. Following this practice, there is no worry if the next theme update will override your custom css changes.
This can be done in two simple steps:
- Create an empty .css file under the /sites/all/themes/{themename} path and name it as you wish. local.css is always a good (apart from obvious :-) ) choice.
- Edit the theme's .info file and add a line like stylesheets[all][] = local.css after all stylesheet definitions
Example
Let's say that we have to add local.css support in our Premium and responsive Drupal TopHit theme.
We should create a new .css file (local.css for example) and put it under the /sites/all/themes/tophit/ path.
Then we should edit the file tophit.info, under the /sites/all/themes/tophit/ and add the line stylesheets[all][] = local.css.
The tophit.info file should contain the following defintions:
name = TopHit
description = The next generation responsive corporate Drupal theme by More than (just) Themes.
version = @VERSION@
core = 7.x
stylesheets[all][] = skeleton.css
stylesheets[all][] = js/flexslider/flexslider.css
stylesheets[all][] = style.css
stylesheets[all][] = local.css
.
.
.
In case this article leaves any of your questions or concerns unanswered, please feel welcome to email us or post a public question.
More than (just) Themes
http://www.morethanthemes.com/