[drupal-devel] drupal.css, again (still)

Paul Byrne paul at leafish.co.uk
Thu May 19 19:33:47 UTC 2005


Bèr Kessels wrote:
> Let us please focus,  -again- on
> drupal.css. 

OK, here's some quickies having had a brief glance:

- remove styles for hr (lines 14-17)
The default style (ie none) for <hr> should suffice, the theme itself 
should style them if needs be.

- remove widths on form items?
These have always given me grief when cobbling together fixed-width themes.

- colours for tr.dark, tr.light (line 34)
Colours should be removed... the theme should specify these (see below [1]).

- move module specific styles (most of lines 210-503)
As already discussed, modules should add their own CSS styles via the 
<head> tag. See below [2].

----

[1] Any CSS moved out of drupal.css, but still valuable in a theme (such 
as tr.light, tr.dark) should be referenced in a 'skeleton' theme CSS 
file. If these important classes are documented somewhere, theme 
designers can start with the skeleton template, or at least ensure they 
have implemented these 'semi-important' classes.

----

[2] On a related note - how 'nice'/efficient/standard would having 
several <link rel....> tags in our HTML <head> be? A site with 10+ 
modules enabled would end up with (up to) the same number of stylesheets 
linked in the header. Would another option be to build a complete 
stylesheet out of the following constituent parts:

   1. the amended, simple drupal.css;
   2. the selected theme's css;
   3. any module specific styles, somehow retrievable from:
        - the module itself (via a hook?)
        - or the [style|$module_name].css file in the module's directory.

This dynamic CSS file would have to be heavily cached to avoid the 
overhead, I suppose. Am I off target?

Cheers,

Paul

-- 
paul byrne - <paul at leafish.co.uk>
web monkey - <http://www.leafish.co.uk/>



More information about the drupal-devel mailing list