Here's a small hack to easily reflect CSS media queries in JavaScript. I'm using the css content attribute in HTML and I'm not sure abou nasty consequences of this and if it works on every browser. Consider this Highly alpha.
A Pen by diogo oliveira on CodePen.