A way of detecting from JavaScript whether media queries have been executed in CSS without duplicating any breakpoints…