3 ms·
I usually specify my max-widths in em (empirically found the sweet spot at about 40-60em). I do it because I think it maps better to text widths, which is what
by kaoD 12y ago
I usually specify my max-widths in em (empirically found the sweet spot at about 40-60em).
I do it because I think it maps better to text widths, which is what you ultimately want to prevent getting overly wide. It also handles different font sizes fine, making the site still accessible for people with big system-wide fonts.
I'd like to know, is there a downside to em or a reason to use px instead?
- nailer 12y agoHrm, that's an interesting concept I hadn't heard of before. I use px because that's what Chrome's responsive view uses, and because that's what viewport uses. I think 'big text' is generally going out of fashion in favour of proper zoom (though we should really get some numbers on that).