I have created a module for observing media query breakpoint changes defined in CSS. A common way to accomplish this is to use window.matchMedia(), but if we want to use the same Media Queries in our JavaScript as in our CSS we have to define them in both environments. Use this module if you want to avoid that.
Hey,
I have created a module for observing media query breakpoint changes defined in CSS. A common way to accomplish this is to use
window.matchMedia()
, but if we want to use the same Media Queries in our JavaScript as in our CSS we have to define them in both environments. Use this module if you want to avoid that.https://www.npmjs.com/package/media-query-listener https://github.com/jonathanp/media-query-listener
Regards, Jonathan