Interesting Links #6


Cascading Style Sheets

  • A List Apart just published an interesting article entitled “Meaningful CSS: Style like you mean it“. One of the takeaways is using attributes in selectors. As great as this may be (I quite like it), it’s also important to mention that attribute selectors aren’t exactly fast. On desktop machines, that’s no big deal, but on slower mobile devices, it might become a very large deal. Real-life example: an app was taking ~100ms to do style calculations on a (slower) Android tablet. The CSS selectors were full of attributes. By switching to classes, however, that same tablet could do the style calculation in 25 to 50 milliseconds, or between a 2-4x speed-up. Note that just because this was so on my app doesn’t mean it would be so on your app. A lot of other optimizations can be applied before worrying about CSS selectors.

Graphic Design

Mac OS X

Our Planet

Leave a Reply