+1 for the OOCSS mentality. A simple example: lets say you have 3 types of linked headers. Start with a base class that defines the most common use, then use additional classes in conjunction with the base class to define the variations.
/* Default linked header */ .headerLink { text-decoration: none; font: 1.2em/1 tahoma, sans-serif; color: red; } .headerLink a:hover { text-decoration: underline; } /* Alternate linked header 1 */ .headerLink-alt1 { color: blue; } .headerLink-alt1 a:hover { background-color: yellow; } /*Alternate linked header 2 */ .headerLink-alt2 { color: orange; font-size: 2em; } <h1 class="headerLink"><a href="#">default header</a></h1> <h1 class="headerLink headerLink-alt1"><a href="#">alternate header 1</a></h1> <h1 class="headerLink headerLink-alt2"><a href="#">alternate header 2</a></h1> At least that's how I think it would apply in the context of this conversation. Kevin On Thu, Aug 25, 2011 at 2:52 AM, Ghodmode <ghodm...@ghodmode.com> wrote: > 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/ > ______________________________________________________________________ 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/