Sunday, October 28, 2007

Bad-Ass CSS 2: The Goods

Ok, no speeches. Mark James's Silk Icon Package speaks for itself as the defacto-standard for good, free web iconography. All the icons should be working--there's a test file so you can see what's what. listing:


Original size (1000 PNG files): 662,196 bytes
New size (1 CSS file, GZIP compression): 587,676 bytes


Why the different packages?

One allows you to declare your icon with a single CSS classname (the alt package), the other requires two (the standard package). Why would you pick the one that needs two if you could have the one that only needs one? Because the standard package is slightly smaller, and because it uses less client memory—so it's slightly faster. Theoretically, the alt package could be useful for browsers that don't support stacked classes, but in this day and age, the only browser you're going to encounter that doesn't support multiple class definitions is Internet Explorer. Since IE doesn't support the data:URI technique anyway, it's all a bit moot, but I included both versions anyway because I can empathize with the lazy.

500k? That's ludicrous for a style sheet!

You probably don't want to include every single icon, genius.


No. No point. Every modern browser supports PNGs just fine except IE, so it won't be a problem because this doesn't work in IE. Just in case that wasn't clear.

Don't worry. In the next post I'll have an IE-friendly option.

Download >>

No comments: