Use better functions for style injection and window.matchMedia