sky lundy

  • Random
  • Archive
  • RSS
  • You can ask me things here.

Object Oriented CSS

I think I’ve said the words “goddamn, I love CSS” at least 12 times in the last month or so, mainly because it’s so easy to use powerfully and cleanly. I have a thing for organizing code, it just feels good when things are.

I’ve been challenging myself to write better CSS and using it in a way that promotes scalability and code readability. There are so many ways to use your noggin’ and use classes and IDs to build your site properly. I just read an article on object oriented CSS that takes this kind of thinking to the next level.

Using multiple classes on markup objects, heavily reducing the use of IDs to style elements, and attempting to throw nth-of-type and “location” based styles- you can split a lot of commonly assigned styles to one class and reuse it in conjunction with, say, how you’d style the div that contains it.

It’s kind of obvious, and it’s something that I’ve been working towards on my own, but this article is great at outlining it as a concept.

Smashing Magazine - An Introduction to Object Oriented CSS (OOCSS) 

    • #webdev
    • #CSS
    • #Smashing Magazine
    • #good idea
  • 7 months ago
  • 3
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

3 Notes/ Hide

  1. billreeseblog reblogged this from skylundy and added:
    I have actually seen several Tumblr Templates that use Class sets to define, like say text styles for multiple objects...
  2. ccorns likes this
  3. skylundy posted this
← Previous • Next →

Logo

sky lundy

About

www.skylundy.com
say hello.

I love books.
I love to run.
I love music.
I love good design.
I think.
I listen.
I chase musical frisson.
I build web things.
& I talk about all of it.
The constant student.
Informavore.

my other internets:

  • @SkyLundy on Twitter
  • electronixon on Last.fm
  • noonesboy on Soundcloud
  • noonesboy on Foursquare
  • noonesboy on github

See more →
  • Photo via prettycolors

    #2e3338

    Photo via prettycolors
  • Photo via jessalea-ann

    Happy Holidays from SantaMom and Princess L.

    Photo via jessalea-ann
  • Photo via jessalea-ann

    nevver:

    The Reader

    Photo via jessalea-ann
  • Photo via jessalea-ann

    theniftyfifties:

    Dovima wearing a fleeced, belted tunic by Dior at the Eiffel Tower, Paris, August 1950. Photo by Richard Avedon.

    Photo via jessalea-ann
  • Photoset via reagan-was-a-horrible-president

    reclaimingthelatinatag:

    nezua:

    soniasaraiya:

    To all the women who quietly made history.

    This reminds me of this:

    Finally, and...

    Photoset via reagan-was-a-horrible-president
  • RSS
  • Random
  • Archive
  • You can ask me things here.
  • Mobile

content by Sky Lundy, unless linked or reblogged. please, let me know if i've stepped on your toes here: hello@skylundy.com.

Effector Theme by Pixel Union