• Random
  • Archive
  • RSS
  • Ask me anything

Ryan Angilly

A business guy who became a really good software developer first by accident

Designers should not use IDs when writing HTML/CSS (right?)


I just had a little chat with Zatch Sharpie about how designers should write HTML/CSS.

It’s my contention that designers should never use IDs.  Ever.  Classes are for designers to style things.  IDs are for developers who are writing JS to interact with specific elements.  Zatch had never heard this opinion before.  In fact he had heard the contrary and retorted with the classic “IDs are for things you use once, classes are for things you use multiple times.”

A good example is the footer or body element.  There should never be more than one of these on a page.  Ok, fine.  But I have to ask: what is the downside to using a class to style it anyway?

There is literally no downside to a designer using classes for all styling, but the flip side is not true.  If a designer uses an ID to style a #email-container wrapper, and then all of the sudden we want to display more than one #email-container we have to go back and fix not only the #email-container style but any styles that descend from it.

I really don’t want to get into a flamewar here, but I’d love to hear other people’s opinions on this.  The only opinions I can find online against using classes for everything is that doing so is “sloppy.”  I don’t see how.  Sounds like religion to me.

Let me know what you think!

(Image source)

    • #css
    • #javascript
    • #design
    • #web development
    • #nerd religion
    • #developers
    • #designers
  • 10 months ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

Portrait/Logo

About

Hi, I'm Ryan, and I build stuff on the internet. I'm currently building Signal Genius.

I blog about my failed startup, MessageSling, at The Day Series.

Things I used to do:

  • Built and launched FourthSegment
  • Hacked at Punchbowl.com.
  • Founded MessageSling.com.
  • Spent several years at EMC

Me, Elsewhere

  • @angilly on Twitter
  • Facebook Profile
  • angilly on Flickr
  • angilly on Foursquare
  • My Skype Info
  • ryana on github

Twitter

loading tweets…

Following

I Dig These Posts

  • Photo via tmills

    A serious bath-taking bear.

    [via]

    Photo via tmills
  • Photo via tmills

    I read this thing on Vice tonight about how girls hate girls even when they’re friends and while all things women are forever hermetically sealed...

    Photo via tmills
  • Link via graysky
    cdixon.org – chris dixon's blog / Best practices for raising a VC round

    (via Instapaper)

    Link via graysky
  • Photo via dancroak

    Puppy.

    Photo via dancroak
See more →
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr