[documentation] Request: Drupal Stylesheet Guidelines

Gary Feldman dpal_gaf_doc at marsdome.com
Tue Jul 11 18:33:59 UTC 2006


Christian Berg wrote:
>> The case convention gets to be interesting because there's already such 
>> a variety in module names.  Perhaps consistency with module names isn't 
>> a necessary goal, but my preference would be to preserve case at least 
>> for those modules using CamelCase.  I'm also not sure if there needs to 
>> be a convention to distinguish between classes defined by modules and 
>> those defined by themes, or between classes and ids.  (I'm constantly 
>> using . when I should use #.)
>>     
>
> XHTML is case sensitive, for this reason i think we should stick to a
> lowercase naming.
>   
I don't follow this.  Lots of languages are case sensitive, but 
CamelCase naming is popular for them.  Java is the prime example.
> For example you would like to theme CamelCase:
> div.CamelCase != div.camelcase
> When you look at drupal.css and many other modules you will see that
> many/all of them are using lowercase classes an id's.
>   
It's true that many or most are doing that, and inertia can be a 
legitimate argument for this.  My counter-argument is that there's value 
in making the wording exactly match the module name (e.g., for 
searching, and for knowing whether insert-block is a block-level class 
defined by the Insert module or a top-level class defined by the Insert 
Block module.  But I can live with either convention, so it's not a big 
deal for me.
> IMHO a simple and clear naming has more pros than cons look at PHP:
> is ist var_dump() or vardump()? is it gettype() or get_type()?
>   
This problem isn't solved either way.  Is it ad-sense or adsense?  
codefilter or code-filter? 

Gary




More information about the documentation mailing list