Kludgy workaround for processing @media blocks

It's not elegant, but it works for my purposes. You might be able to build off this if you're interested.