Search code examples
cssthemescolor-schemedynamic-css

CSS - Separation of Color and Position


I'm just wondering what others do in this respect:

Do you try to keep positional CSS (layout) separate from color/flavor CSS (color, background-color, background-images, font-size and family) ?

Use two stylesheets? Combine two stylesheets server-side? Abstraction layer for the CSS? or you don't even try?

I know sometimes after working on the same web project for six months I can usually live with the positional CSS but end up wanting to change the colors/images.


Solution

  • I tend to keep all the CSS together, without separating "color styles" from "positional styles" or "layout styles". I find that when I often try to debug a specific "module" it's easier to have all the CSS rules applied to one selector, and not spread out over the style sheet.

    However, I do suggest you read Creating Sexy Stylesheets over at thinkvitamin.com. One thing I do is list the rules in a certain order everytime, so I know within the declaration block where to find what I want.

    More info at Jina Bolton's http://creatingsexystylesheets.com/