respect media attribute on external stylesheets

This Pull Request adds media attribute detection on external stylesheets.

Regards,
Fabian