[documentation] Request: Drupal Stylesheet Guidelines

Christian Berg xeniac at gmx.at
Mon Jul 10 23:00:22 UTC 2006


Hello Everybody!
1.) Introduction:
My name is Christian Berg, i'm from Austria/Europe, i speak german, and
use Drupal since November 2005. Im also maintaining an contrib-module
named onlinestatus.

My onlinestatus module makes use of an CSS Stylesheet.
Last friday someone poens a Bugreport "Broken Link to style.css"
http://drupal.org/node/72470
This Bug triggerd a whole event of confusion for me.

1.) Drupal supports theme('add_style') and theme('stylesheet_import')
2.) I have not found any articles on api.drupal.org or in the Drupal
Handbook if anyone of this two is deprecated, or prefered.
3.) I think that the use of CSS Files in Drupal have not got much
attention yet.

My first thought was that i should add a new "Use of Stylesheets" Page
in the "Drupal Coding Stadards" Book, but i belive this topic should get
some discussion in the first place.

I think a Drupal Stylesheet Standard could/should include a lot:
1.) Adding the Stylesheet to Drupal
    use stylesheet_import for modules and add_stlye for themes.

2.) Modules should prefix their css classes to prevent collisions.
    for example: <div class="foo_listheader"></div>

3.) .css files should start with /* $id */

4.)  If Drupal gets an identing rule, we also should apply this for CSS.

5.)  Naming Convention: Strictly lowercase, words seperated with _

I hope you like my idea

with best regards

Christian

Wußten Sie schon... ... daß auch Glatzköpfe Glückssträhnen haben?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4868 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/documentation/attachments/20060710/6024aab9/smime.bin


More information about the documentation mailing list