Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.


Overhauled the theme scripts last week.

Instead of the convoluted attribute style that we were using for themes before, it's now a simple one-to-one list of styles and theme attributes. I think I was making a false assumption before that a single style attribute would be used for many thing on a node, but the truth of the matter is that it's just not how it's worked out. One to one doesn't really sacrifice much in terms of "cleanliness", but it buys me tons of speed and the ability to now set themes and styles at the same time (and not incurr a huge parsing hit).

What does all that blathering mean? Well, in 0.2.3, you'll be using theme.setStyleByAttr(nodeRef, themeAttrName, styleName) all over the place, and you'll save yourself all kinds of trouble in the process.