Jump to content

Style Sheet File Size Question


straightryder

Recommended Posts

I've never worried about the size of a CSS file - it's just text. And the size of that file really has nothing to do with the number of pages - the whole idea of a CSS file is to have ONE (or several for different issues) that connect to ALL your HTML pages.

Link to comment
Share on other sites

The stylesheet on my personal site is around 30kb, so I don't think you have to worry too much. Probably spending some time optimizing images would be a better use of your time.

 

I've found the Firefox/Firebug plugin "yslow" useful for figuring out how best to optimize web pages (though it tests a couple things which I don't think will help page speed all that much unless you are a large site with a lot of traffic):

http://developer.yahoo.com/yslow/

 

You can always compress your CSS files (removing comments & white space) in order to reduce file space, though that will make them difficult to edit later: http://www.cssdrive.com/index.php/main/csscompressor

Link to comment
Share on other sites

I was kinda thinking along the same lines....

 

Its just that being new to all this makes you somewhat 'panicked'...

 

For instance: I read that the css should be between 8 and 12kb.... mine was at 14kb... "OH $#@% i thought, so i started to cut the bloat from the SS. lol....

 

Its good thou, gets you knocking out crap you don't need and getting used to implementing shorthand props'.

Link to comment
Share on other sites

Very similar to YSlow but from Google (Installs as Chrome or Firefox/Firebug plugin):

http://code.google.com/speed/page-speed/

 

Also I use this at the end of projects to minify my CSS document (It removes all the white space/line breaks/comments etc from your CSS and returns a CSS that's only 1 line):

http://www.ventio.se/tools/minify-css/

Note: Please make a backup of your original file in case you need to edit it again

 

Also for optimizing images this site is good:

http://www.smushit.com/ysmush.it/

It's made by Yahoo, all you need to do is provide a URL or upload an image file and it will return an optimised one for you to download. Sometimes cuts image sizes in half! Sometimes only by a little bit.

Link to comment
Share on other sites

Currently, (and almost done) I have been working on a big project that requires alot of css for a variety of reasons and to date I have one at 33kb and the other at 17kb. So in my case my css files total to be 50kb.

 

However, the biggest css file size I have ever found was from a template that a client wanted to use which was over 60kb. It was a totally overkill for such a simple design.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...