On Fri, Sep 5, Stan Brown inscribed on the eternal scroll:
First thing is, NEVER make text size in pixels or points; ALWAYS use
ems or percents.
For screen display I'd say that's almost always good advice.
Just very occasionally it may be appropriate to display a pixel-sized
object with some closely-associated text sized in pixels; but don't
overlook the possibility (with suitable image material) to size the
image in em units to match the text, rather than sizing the text to
match the image.
Same for margins, heights, widths, etc.
Well now, I think it could be going too far to say that should
_always_ apply.
When normal-sized text is being displayed on an ample-sized canvas,
then it's nice to have good margins, sure, and the same usually goes
for other kinds of content too. However, if someone has to scale-up
the text for poor visual acuity, they likely won't thank you for
scaling-up the empty spaces to match - which is what's going to happen
if you measure the space in em units. I won't claim to have any kind
of magic formula, but it seems to me that for better compatibility
with a wide range of viewing situations, it could make sense for some
elements of margin or padding to be sized in px units, others in more
scaleable units. (Probably with a max linewidth in em units, and auto
margins, for those browsers which support it.)
all the best