Keep Your Classes Clean

Published 19 years, 10 months past

A picture of three bottles of the general-purpose cleaner 'Simple Green'.  The first contains a dark green liquid, as you might except given its name.  The second contains yellow (lemon-scented) liquid, yet is still called 'Simple Green'.  The third is a white bottle with a purple label; again, it has the name 'Simple Green' prominently displayed.

See, that’s why presentational class names are such a bad idea.


Comments (11)

  1. I definitely agree with the principle, but I think I should point out that Simple Green is so named not so just for the green color of the basic product, but for the environmentally friendly nature of the products.

    Also, not to be picky, but isn’t the classname on the image “border”?

  2. Haha… we use that in Bio!

  3. Trackback ::

    backstage rogers

    Geek jokes

    I love ’em.

  4. Ah, Mr. Kawakami… indeed the class name is border. You have looked beyond the surface and discovered the truth buried within the truth. Well done, Grasshopper.

  5. Hah hah Eric got busted!

  6. I have seen this type of stuff several times before. It is also very common for products like chewing-gum and mints to do this.

    Thanks for the chuckle.

  7. A sobering point indeed. Presentational class names are clearly a lose-lose situation and are best avoided like the plague.

    Why, even if Sunshine Makers decides to embrace the color motif, it’s still doomed from the start. Simple Green … Curious (Yellow) … Purple Rain … Soylent Green (!) … I mean would you just look at that list – it’s a total catastrophe!

    (“Dada marches on …”)

  8. Some of us have enough trouble getting our sites to look half as good as this one … even with all the colors turned off (Firefox preference) — and now we have to worry about keeping our classes clean? Oh, well … I suppose I should think of it as ‘job-security’ n’est-ce pas?.

    Thanks for the excellent advice: your site always keeps me honest, even if it’s only with myself. Also, I love the Gatekeeper function, though I wonder if it has produced any snippy comments. (Umm … orange?)

  9. hah…can’t believe i missed this the first time around…

  10. Pingback ::

    ļāūņš ļāčīš » Blog Archive » Around the web in 80 days #6

    […] ā pēc iespējas lētāk uz sava tēkrekla dabūt govi. Saites, kuras sāk novecot. Eric’s Archived […]

  11. Pingback ::

    ara pehlivanian » Blog Archive » Sidebar Semantic Shenanigans

    […] o find all kinds of auxiliary information. Now we’re all aware of the importance of keeping our classes clean, meaning that they shouldn’t contain presen […]

Add Your Thoughts

Meyerweb dot com reserves the right to edit or remove any comment, especially when abusive or irrelevant to the topic at hand.

HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <em> <i> <q cite=""> <s> <strong> <pre class=""> <kbd>


if you’re satisfied with it.

Comment Preview