LearnBoost/juice — pull request #12 by cbumgard (2012-12-13 11:04:53+00:00)
Title: Fix for @media rules in css (which do not have selectorText)

make sure the css rule has selectorText to prevent parsing exception. hit this on @media rules which do not have selector text. afaik this means media queries will not be inlined. however everything else is.

without this fix the following happens when it hits the media rule:

/juice/lib/utils.js:23
for (var i = 0, l = selectorText.length; i < l; i++) {

TypeError: Cannot read property 'length' of undefined

came upon this while writing code to inline these nice responsive email templates in my node project: http://www.zurb.com/playground/responsive-email-templates