Main benefit is the the em relationship between text size and breakpoints. If you zoom your browser in to increase the text size the breakpoints will move with it keeping the breakpoint decisions you initially made still relevant.
It is a Chrome Extension that shows you information about the media query breakpoints used on a page. A nifty little feature it has is it will tell you both the PX and EM value, which is useful for converting PX values to the correct EM ones. It also does a bunch of other useful things too.
Y’know – this is what I love about the web at the moment – you lift one rock and there’s a whole playground of new stuff you never knew existed. For eg just discovered this: http://clagnut.com/blog/348/ – WHO KNEW!? Well, everybody except me i guess! o_O
Thanks for those links guys – made for some really good reading.
I’m gonna have a play with REMs. The browser landscape here in South Africa is interesting as there is a greater need to support IE8 and below so fallbacks are going to be _really_ important if I go that route.
@scottnix: that’s an interesting position you’re taking there – would you elaborate? This REM thing looks like a really good idea – why the vehement opposition?
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.
Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".