May 14, 2013 04:55 pm GMT
Original Link: http://css-tricks.com/media-query-change-detection-in-javascript-through-css-animations/
Media Query Change Detection in JavaScript Through CSS Animations
The following is a guest post by Alessandro Vendruscolo. Media queries are relevant to both CSS and JS. The need and desire to manage those in one place is real. There have been some clever ways to do this, like Jeremy Keith's Conditional CSS. But in that case, the onus is on you to test after window state changes. You can get a true listener with MediaQueryList, but then you're maintaining the media queries in both places again. Ah …
Media Query Change Detection in JavaScript Through CSS Animations is a post from CSS-Tricks
Original Link: http://css-tricks.com/media-query-change-detection-in-javascript-through-css-animations/
Share this article:
Tweet
View Full Article