Previous Message
Next Message

Re: [css-d] CSS Methodologies

Sent by Andy J. W. Affleck on 23 July 2003 16:04


On Wednesday, July 23, 2003, at 10:35  AM, Alex Jones wrote:

>   - Classes, IDs and elements are listed in alphabetical order unless 
> otherwise noted. The properties of each class, element and ID are in 
> alphabetical order as well. So the "acronym" tag comes before the 
> "body" tag which comes before the "price" ID in the stylesheet. I find 
> this makes it much easier for me and other developers to locate 
> specific items within the stylesheet quickly.
>

I'm also interested in what people do.

I've tended towards having four major sections to my css files:

1) Site structure (main divs, body, anything that defines the major 
areas of the site like header, footer, nav, body, etc.) --- another way 
to think of this is anything that defines a physical box that stuff 
goes in. I never have more than 5 or 6 defs here.

2) Styles specific to the boxes above. This is where stuff like 
#navPanel h1 would go, etc.

3) Overrides to default html: this is where h1, h2, h3, p, li, ul, 
fieldset, etc definitions go.

4) Custom classes/ids that are not specific to a box but are 
site/page-wide.

This has worked out the best in terms of editing and going back later 
to see what I did.

-A

Andy J. W. Affleck
[EMAIL-REMOVED]
http://www.raggedcastle.com/webcrumbs/
iChatAV/AIM: andyjw23

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: