I may be outing myself in the nerdiest way, but I really enjoyed Nicole Sullivan’s talk at Web Directions North on Object Oriented CSS. I don’t think anyone I know would be interested in a conversation about strategies in making flexible and scalable CSS (imagine friends running for the nearest open window), so it makes me happy that these conversations are accessible in other ways.
The relatively unimportant one: this isn’t really “object oriented” in any way I’m seeing. But it does help get up on the hype wave, I guess.
More important: I’m not sure this cure isn’t worse than the disease if extended too far, i.e. to sites that have radically different presentations for different devices (for example).
But in all cases, as a metaphor for creating cleaner CSS and, well, using the “cascade” (inheritance, if you want to continue the misuse OO terms 🙂 part of the technology, it makes good sense.
It strikes me that writing CSS is just writing other kinds of machine-code– it’s easy to be lazy until it is too late to easily fix. Nothing new, but that doesn’t mean it’s not still important.
Well, no, the message isn’t earth shattering, but the practice of thinking and planning ahead when it comes to CSS is one that can always use more practitioners.
I’m curious how this approach could be extended too far. It would seem that in the case of multiple presentation devices that a stylesheet would specify to not display elements ill-suited for the device. I guess there is a point where the developer might try and accommodate too many display devices at once, but being that specific seems inefficient.