On Thu, Aug 25, 2011 at 5:29 AM, John <j...@coffeeonmars.com> wrote: > As I evolve my site, I'm differentiating styles by altering the name so that > I can adjust attributes. > > example: home page head and sub-page head might be mostly the same, but one > might need different positioning or color. > > can my style sheet get too long? It only measures about 2K in size right > now, but what if it got to a whopping 16K?
As far as I know, there's not a limitation on the size. As Philippe Wittenbergh, mentioned, Internet Explorer limits the number of rules to 4095 and the number of stylesheets to 31 (not 32). Here are a couple of links that refer to this limitation in IE: - http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/ - http://support.microsoft.com/kb/262161 > is that a big concern, or is the human angle a bigger deal in terms of > keeping everything straight? It's annoying when IE imposes a limitation on us that none of the other browsers do, but I think that almost all sites should fit within the 31/4095 limit. Having said that, I have run into the stylesheet limitation on a large Django-based site with lots of developers working on lots of different parts of the site. But the problem only happened in development because we minified and combined the stylesheets before pushing into production. Also, there was a lot of room for optimization of all of the code that would have eliminated the problem entirely. Something that might help is the concept of Object-Oriented CSS which was presented by one of the Yahoo developers. The GitHub Wiki: - https://github.com/stubbornella/oocss/wiki The presentation: - http://www.stubbornella.org/content/2009/03/23/object-oriented-css-video-on-ydn/ Or just the slides: - http://www.slideshare.net/stubbornella/object-oriented-css > thanks! > > J -- Ghodmode http://www.ghodmode.com/blog ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/