The width
media query uses the width of the layout viewport (or, on desktop, the width of the viewport). The height
media query uses the height of the same.
Your browser does not support getComputedStyle()
. Therefore this test page doesn’t work. Please ignore the results.
width=device-width,initial-scale=1
initial-scale=2
In a media query context 1em = 1rem = initial font size. By default that font size is 16px, but it depends on the browser and the user settings. In your browser it’s .
I use the following function to find the initial font size:
function getInitialFontSize() { var ifs = window.getComputedStyle(document.documentElement,null).fontSize; return parseFloat(ifs); }
See notes at the bottom of the page. Reload after resizing your window or changing the orientation.
See notes at the bottom of the page. Reload after resizing your window or changing the orientation.