Root EM Using CSS3 "rem" Units for "Elastic Pixels"
jsbin.com
jsbin.com
Meaning that, basically, you use the following rules:
px = you want it to be x pixels when not zoomed at all
em = you want it to be relative to the parent div (ex: parent is 10px + child is 1.1em = child is 11px)
Personally, I find em to be a bit too susceptible to breakage since they're relative to the size of the parent (which is relative to the size of their parent, etc).Using rem is interesting, however I disagree with most of what was said in this post.
But that defeats all the principles web sizing is based on. You should virtually never write CSS that is dependent on the physical pixels of the device. I can't even think of a case where you would want to.* Write code for logical pixels ("px"), and let the browser/device do all the zoom/dpi/retina/etc. calculations to give the user the size that makes sense for their display.
This is regression, not progress. The author says "px unit's don't scale"... No, they do scale, that's the whole point. The author's solution maps logical pixels to physical pixels, which is a bad idea.
* Sole exception being resolution of images (normal, retina, etc.), but that has nothing to do with "rem" units.
If you have a specific segment of the page sure - but then you can just use percents.
But your entire site? I don't think you'll ever have to do that, certainly not often enough to need a whole new unit.