I'm a Systems Reliability and DevOps engineer for Netdata Inc. When not working, I enjoy studying linguistics and history, playing video games, and cooking all kinds of international cuisine.
In visual display media, alwaysrem, except on the root of the document (where I usually use pixels because they are de-facto consistent across all platforms. Using rems means that the site layout works correctly no matter how much zoom the user uses, because it all scales together.
For print media it gets a bit trickier. I would normally use points there because most printers will know how to handle that correctly without multiple unit conversions (unlike other absolute units which may or may not need to be converted twice). I might use ems if I need to offset size relative to the parent font size for some reason, but would probably not use relative units for anything else, instead relying on the (sane) assumption that people are printing at the 'correct' size (and obviously handle margins correctly so that I don’t need to handle separate styles for US and ISO paper sizes).
There is no need for rem nowadays, every browser scales correctly with px, em/rem has no other advantages and in most cases will produce only needless calculations for next developer who will try to work with your code.
Yep, that's what I do, I strongly disagree with people who use em (rem is fine) as it brings lots of complications to code and measurements.
If you need a good example of website that uses px – just land on google.com
If you are interested in how i work with px you can explore my open source app – github.com/rtivital/omatsuri
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In visual display media, always
rem
, except on the root of the document (where I usually use pixels because they are de-facto consistent across all platforms. Usingrem
s means that the site layout works correctly no matter how much zoom the user uses, because it all scales together.For print media it gets a bit trickier. I would normally use points there because most printers will know how to handle that correctly without multiple unit conversions (unlike other absolute units which may or may not need to be converted twice). I might use
em
s if I need to offset size relative to the parent font size for some reason, but would probably not use relative units for anything else, instead relying on the (sane) assumption that people are printing at the 'correct' size (and obviously handle margins correctly so that I don’t need to handle separate styles for US and ISO paper sizes).There is no need for rem nowadays, every browser scales correctly with px, em/rem has no other advantages and in most cases will produce only needless calculations for next developer who will try to work with your code.
You've been denying em, rem in all your replies. Its for responsive designs and you've been shown a link to it.
What are some designs you've created with 0x would like to see.
Yep, that's what I do, I strongly disagree with people who use em (rem is fine) as it brings lots of complications to code and measurements.
If you need a good example of website that uses px – just land on google.com
If you are interested in how i work with px you can explore my open source app – github.com/rtivital/omatsuri