milkshakesoftware/PreMailer.Net — pull request #41 by tobio (2014-05-01 01:38:23+00:00)
Title: Adds support for media queries on the style tag itself, and within the stylesheet. 

I understand that Premailer attempts to deal with this via the ```ignore``` parameter, however we'll be using this with arbitrary user provided source and hence the parameter is not adequate.

These commits add support for ```@media``` queries within parsed stylesheets and the ```media``` attribute on the style tag itself. When either of these are encountered, the query is checked to see if it would apply by default (would apply to screen or all with no other conditions). If the query would apply by default then the rules are parsed as normal, if not then the rules are ignored in the inlining process.

In reality, Premailer should parse all non-default CSS rules, and add ```!important``` flags to them all to ensure that they override the inline styles when applied by a client device. I'll be looking at that shortly.