Underspecified CSS: Bad practice
Automated disclaimer: This post was written more than 15 years ago and I may not have looked at it since.
Older posts may not align with who I am today and how I would think or write, and may have been written in reaction to a cultural context that no longer applies. Some of my high school or college posts are just embarrassing. However, I have left them public because I believe in keeping old web pages aliveāand it's interesting to see how I've changed.
Underspecified CSS is the bane of large sites.
Embedded emails">Embedded emails
CSS in email is a completely different ballgame from standard web design, but provides an excellent example for today's discussion. My company sends out a weekly e-newsletter that contains something like the following code:
#article-content ul li
{
list-style: url(/images/right-angle-quote.gif);
}
In summary, by specifying your selectors as tightly as possible, you'll avoid a world of cascade trouble.
No comments yet.
Self-service commenting is not yet reimplemented after the Wordpress migration, sorry! For now, you can respond by email; please indicate whether you're OK with having your response posted publicly (and if so, under what name).