[support] Adding to the CSS of a theme?

John Fletcher fletchnet at internode.net.au
Tue Feb 26 00:02:08 UTC 2008


Roy,

Why don't you just copy a theme folder into sites/all/themes and give it a
new name and then edit the css files there?

Anyway I sort of wanted to relate the following to anyone interested so I'll
stick it in here because it's relevant.  In Drupal 6, I started building a
theme from scratch recently. The new theming handbook is a bit vague on this
- it jumps from absolute basics to quite technical descriptions of hooks and
stuff.  The old theming handbook is outdated as the basic requirements for a
theme have changed.  Anyway, this is what I did:

a) Create a themename folder in sites/all/themes
b) Create a file called themename.info in this folder.  The file should
contain the following:
name = Human readable name of theme
description = Human readable description of theme
core = 6.x
engine = phptemplate
c) Set the admin theme to Garland or whatever
d) At this point you can already select your new theme as the default theme
for the site and use another browser (ie. not logged in to Drupal) to view
it.  It should work, but look fairly bad.
e) Create a file called styles.css in your theme directory.  This will
automatically be picked up.  There you can start creating styling rules.
f) If you want to edit the PHP, search the file system for the files
block.tpl.php, box.tpl.php, node.tpl.php, and page.tpl.php and then copy
them all to your theme directory.  Then you are starting with the default
files and can edit them a little - any versions of these files you copy from
other themes (eg. Zen) are quite different to the default files.

Regards,
John



More information about the support mailing list