cssmedia-queriesrules

@media queries & smashingmagazine.com


Do CSS3 media queries "re-evaluate" upon changes to the browser? For example, if I have:

@media screen (min-width=400) {... some style}
@media screen (min-width=800) {... some other style}

And the user re-sizes their browser from meeting min-width=800 to something only meeting min-width=400, will it automatically re-apply all CSS rules?

reference: http://reference.sitepoint.com/css/mediaqueries

Additionally, is this how http://www.smashingmagaze.com/ is currently updating their site based upon the calculated browser width?


Solution

  • Yes, I have found that this is the case. If you have a series of @media queries for different browser sizes and resize your window, you can see things moving around 'live.'

    That's exactly what Smashing Magazine doing, you can see the responsive CSS here: http://media.smashingmagazine.com/themes/smashingv4/stylesheets/responsive.css?ver=3939