Cutting the mustard
The browser is a hostile development environment and supporting a wide range of desktop browsers can be tough work.
One of the immediate challenges we discovered when we first started the responsive news prototype was the large range of devices that we would have to support. It terrified us. This article is about a solution we use to alleviate this problem.
This is a nice technique but I wouldn’t exactly call it elegant. Maintaining a copy of the content in the textarea just to set the height of the textarea is always a hack, no matter how clean the code is. This is pretty clean code though.
Somebody mentioned this to me today. Looks interesting. WIll investigate.
Nice recap of using Compiled CSS for more than just some convenience functions. Some discussion in the comments about perf claim OOCSS is the best bang for the buck.
But the developer benefits of the technique described could outweigh the perf benefits of OOCSS in some situations.
The article describes a pretty little technique, though it does expose a certain gap in CSS/JS. An array of stylesheets, each containing an array of rules, is a terrible abstraction. It leads to the keyframes = stuff you see in the screenshot: generating CSS as text. It would be nice to have a dynamic css class definition library.
On the other hand, if the world had a dynamic css class definition library, the first thing to happen would be it’s horrible horrible abuse. Every event (hover, click, keypress) would cause the entire page to redraw. IE would just melt down. In short, pandemonium. So maybe it’s best we just continue to specify every browser’s styles in our static css files.
Nicole Sullivan started the OOCSS, of which I’m a fan. These are somebody’s notes from her talk. She has good stuff to say.

