Angry CSS Tip: Don’t Name Your Classes After Attributes

October 4, 2007

Name your classes something sensible! If I see another CSS class named “blueText” I will scream. YOU CAN TELL IT’S BLUE WHEN YOU LOOK AT IT, STUPIDS.

CSS was invented to make attributes easy to change. Say you want a blue message on all your pages. You sensibly label it with a CSS class ‘message’ and set its ‘font-color’ to blue in the stylesheet. Then it hits you that your users are blind idiots. Since you’re smart, you just go to your stylesheet and change one attribute from blue to red. Then you can shut down your computer and spend some time with your kids before they end up in juvie from your absentee parenting.

If, however, you are retarded like some of the people I work with, you will not name your class ‘message’. You will name it ‘blueText’. When you change it to red, you will go through every one of your pages and change the class name to ‘redText’. Then you will go home, wonder why CSS was ever invented, and cry yourself to sleep.

Advertisement

3 Responses to “Angry CSS Tip: Don’t Name Your Classes After Attributes”

  1. @lpha Says:

    I agree with you.

  2. Jim Menard Says:

    This would make a good Bob the Angry Flower (http://www.angryflower.com) lesson, such as the classic “Bob’s Quick Guide to the Apostrophe, You Idiots ” (http://www.angryflower.com/bobsqu.gif).

  3. gth Says:

    Like I said: humans have trouble with “one-to-many” relations. Too many cars, too many IEDs(land mines), too much porn, too many Dell’s, too much MicroSoft, too many iPods, too little “common sense”, too many stupids …

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s