Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- CSS Coding Standards - Part 2


Hester - 9:29 am on May 28, 2008 (gmt 0)


the CSS protocol needs to be rethought out and recreated from scratch

Not sure I agree. And it's highly unlikely considering we haven't even reached CSS3 as a recommended standard yet.

It's too flexible.

Better that than too strict.

One page can affect a whole website

Great! Welcome to the power of CSS.

it's really hard to even come up with a standard way to lay out a css file.

Who says there has to be a standard way? So long as the styles are applied correctly (ie: bearing in mind inheritance) and lines aren't wasted repeating styles, then what is the problem here. I doubt if you look at the source of HTML pages that they are all laid out in a single standard way.

Think of it like writing a story. Every writer will have their own style. So long as it 'works' that's OK isn't it?

Myself, I do my stylesheets like this:

- main elements first (body, headers etc)
- then key layout divs
- then I style the IDs, classes and links as separate sections
- lastly I put in any per-page styles. (Eg: if only one page has a special style needed I add an ID to the body tag and style it that way)

As for BOOKS, I'm sure there are MANY published on how to name CSS. I'm sure someone like Eric Meyer or Dave Shea has made one. And what about the countless articles on the web?


Thread source:: http://www.webmasterworld.com/css/3656519.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com