Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 14, 2013 04:55 pm GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks