This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2006 > CSS authoring organization





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CSS authoring organization
Sean Chambers

2006-11-19, 7:35 pm

Hello,

I am starting to fully use CSS in all of my designs and I have a few
questions regarding organization of my style sheets.

I had a friend of mine say that I should seperate the positioning
elements and formatting elements into two seperate parts of my css file
or even two seperate files altogether. Is there any reason to do this
other than personal organization?

Thank you

Sean

K A Nuttall

2006-11-19, 7:35 pm

Sean Chambers wrote:

> Is there any reason to do this
> other than personal organization?


Not that I'm aware of. It might help for clarity, but it really depends
on how you (and your colleagues) work. I tried separating typography
from layout once, and got myself into a right pickle.

--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid
Bergamot

2006-11-19, 7:35 pm

Sean Chambers wrote:
>
> I had a friend of mine say that I should seperate the positioning
> elements and formatting elements into two seperate parts of my css file
> or even two seperate files altogether.


I personally don't see any benefit in this. I prefer to have all the
style rules for a given selector together if possible, so I don't have
to hunt around too much to find something.

Organize it in whatever manner makes sense to you, and will make future
maintenance easiest. If that means multiple files, so be it.

--
Berg
Harlan Messinger

2006-11-19, 7:35 pm

Sean Chambers wrote:
> Hello,
>
> I am starting to fully use CSS in all of my designs and I have a few
> questions regarding organization of my style sheets.
>
> I had a friend of mine say that I should seperate the positioning
> elements and formatting elements into two seperate parts of my css file
> or even two seperate files altogether. Is there any reason to do this
> other than personal organization?


Whether and how to break your CSS into modules depends entirely on what
your needs are. For example, on one site I created a standard stylesheet
that specifies padding, alignment, font weight, and border type and
width properties for classes I use to mark data tables on the site and
their cells according to whether they are headers or data, alpha or
numeric, totals, etc. Since each part of the site has a different color
scheme, I also create an additional CSS file for each part of the site
that specifies the border and background colors for the same classes.
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews