Use media query event listener instead of a listener on the resize event