| I don't completely agree with author's opinion. I think the Facebook Way (tm) has its pros, but using page-level specificity is a great way to avoid specificity hell. To be more specific, for a site with vastly different pages, it's best to have page or section level class that limits the scope of each css definition, so the person making change to one section of the site will not accidentally break other pages. Also, with little base style, there is less need to override styles with more specificity. For such a site, CSS like this tend to be easier to maintain: #home-page h2 {
/* home page title styles /
} .news-item h3 {
/ news item title /
} #widget-page h2 {
/ widget page title /
} .widget-item h3 {
/ individual widget title */
} |