Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Splitting css - color, layout, topography


lucy24 - 10:33 pm on Jan 3, 2012 (gmt 0)


I wouldn't break up the CSS at all unless there are clearly distinct pieces that are #1 very large (so that the extra request is outweighed by download time) and #2 aren't used by all files. If you have 1000 pages and 950 of them use both stylesheets, it's hardly worth the trouble.

In fact I tend to move in the opposite direction. Any given directory has its own stylesheet, but if a style is used only by one document, that stays within the document itself. The moment two documents use the same style, into the shared stylesheet it goes.

All of that is assuming the stylesheet itself is laid out in a way that makes it easy for you to find and edit individual pieces. That's a personal choice. Mine for example is groupled thematically: headers, paragraphs, tables, text modifiers (that is, things that are most likely to show up in a span). If you have one of those stylesheets that's jammed into a single line with not one speck of whitespace* anywhere, all bets are off. Besides, it's very annoying for site visitors who want to snoop into "How did they do that?" territory.


* The kind that requires moderatorial action when someone posts a sample ;)


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