Add media query classes to DOM nodes