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

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.

This entry was posted in Angry Development Tips, Technology. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

5 Comments

  1. Posted October 5, 2007 at 1:27 am | Permalink

    I agree with you.

  2. Posted October 5, 2007 at 1:08 pm | Permalink

    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
    Posted October 5, 2007 at 2:27 pm | Permalink

    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 …

  4. ingemar
    Posted October 24, 2007 at 12:41 am | Permalink

    Hahahaha! People actually do this??

  5. Posted October 24, 2007 at 2:24 am | Permalink

    You bet. I’ve seen more than one person do it.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>