HowTo:local.css

From MtTWiki

Jump to: navigation, search

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 practise, there is no worry if the next theme update will override all the custom changes.

This can be done in two simple steps:

  1. 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.
  2. Edit the theme's .info file and add a line like stylesheets[all][] = local.css

Example

For example let's say that we have to add local.css support in our Pressblog theme.

We should create a new .css file (local.css for example) and put it under the /sites/all/themes/pressblog/ path.

Then we should edit the file pressblog.info, under the /sites/all/themes/pressblog/ and add the line stylesheets[all][] = local.css.

The final pressblog.info content will be

name = PressBlog - MoreThanThemes
description = PressBlog - Div based theme
version = VERSION
core = 7.x
 
stylesheets[screen][] = style.css
stylesheets[screen][] = 960.css
stylesheets[screen][] = js/SpryAssets/SpryTabbedPanels.css
stylesheets[all][] = local.css
 
regions[page_top] = Page top
regions[header] = Header
regions[header_bottom] = Header Bottom
regions[search_area] = Search area
 
regions[content] = Content
regions[help] = Help
 
regions[sidebar_tabs] = Sidebar Tabs
regions[sidebar_first] = Sidebar
 
regions[footer_first] = Footer first area
regions[footer_second] = Footer second area
regions[footer_third] = Footer third area
regions[footer_fourth] = Footer fourth area
 
regions[footer_message] = Footer message
 
regions[page_bottom] = Page bottom
 
scripts[] = js/SpryAssets/SpryTabbedPanels.js
 
settings[breadcrumb_display]= 1
settings[slideshow_effect]='fade'
settings[slideshow_effect_time]='10'
 
version = "7.x-1.0"
project = "pressblog"
Personal tools
Namespaces
Variants
Actions
Main Menu
Premium Themes
Toolsets
Freebies
Navigation
Toolbox
This wiki is hosted by morethanthemes.com, creators of top quality premium and free themes for Drupal 6 and 7, as well as HTML and PSD themes.
Find out more
for Drupal 6 & 7