1. I am working on an application that currently has some 30+ CSS files. I maintain that this is just wrong and defeats the purpose of using CSS files in the first place. Sites I have previously worked at usually had just one CSS file or at least only a few. What is considered correct? Is there any definitive place on the web that addresses this?
2. What is considered the best way to handle styles that are unique to a page, e.g. to create proper spacing? My preference would be to create an embedded style sheet, i.e. within an HTML element.
3. Is there ever a valid use for inline styles other than to quickly mock up an HTML page or handle something that is truly unique?
4. Is it considered better to use a single style class name, i.e. class="mystyle", or use multiple style class names, i.e. class="my style", for HTML elements? It seems to me that multiple class names would enable greater reuse of styles.
You really should have one CSS that all of the pages use. You need to make generic css rules that apply to the pages. It makes it easier to update things. Some people tend to have the same rule named differently on pages because they are too lazy to see if something is already like that.
If you find that rules are to specific, break them up into smaller chunks and combine them in the CSS tag.
You can use inline, but it defeats the purpose of easily updating stuff in the future. Feel free to give that find and replace feature a reson to exist still!
One of the apps I work on is large fincanical application with tons of pages. While all pages do include a large "core" stylesheet that defines styles that should be maintained throughout the site, we also have a handful of smaller styles sheets that are only applicable to particular categories of pages. For example, pages that emulate dialog boxes have a css file that augments the "core" set of styles with dialog-only style elements.
But even in this enormous app we only have about a dozen different style sheet files that are logically broken up as described above. 30+ does sound excessive. [ March 15, 2006: Message edited by: Bear Bibeault ]