I just swapped out all media queries on my company's platform from px=>em and I'm not seeing the result I expected after reading many other threads like this: Switching to Em-Based Media Queries and a handful of blogs praising em's over px.
When I have a stylesheet that is meant to only show like this:
<link rel="stylesheet" href="css/special.css?256D" type="text/css" media="screen and (max-width: 64em)">
... I want the style sheet to show up when the size of the WINDOW is below 1024px, or 64ems. My html font size is hardcoded at 16px.
When I check the ems via this handy snippet from another SO question:
$(window).width() / parseFloat($("html").css("font-size"));
... I get different values at different zoom sizes, because the value of window.width changes with the zoom. This is wrecking the mobile experience for my users since only the size of the true screen should dictate what is being displayed.
Is what I want possible without serving dynamic content via JS, etc?