Home › Forums › CSS › [Solved] EMs for media queries and layout › Reply To: EMs for media queries and layout
September 17, 2013 at 8:16 am
#150307
Larry
Participant
No need to use rem’s for media queries – the value em’s obtain is that of the user agent, and not from your styles: http://www.stephanmuller.nl/ems-relative-media-queries/
I’ve used em’s with the assumption that 1em ~= 16px in media queries for a while now. I discovered this after being baffled as to why my breakdpoints weren’t working, and eventually discovering that no matter what I had set my base font size to, media queries were consistently being calculated at +-16x the value of the em in the media query.
Don’t worry about fallbacks – just use em’s for media queries, and use rems as you’d want everywhere else.