Mobile app version of vmapp.org
Login or Join
Cooney243

: Are physical units for web design a good idea? Coming from a design time pre-digital and musing over the 'pixel' would a physical measurement such as a cm work in web design at some point?

@Cooney243

Posted in: #Css #Units #WebsiteDesign

Coming from a design time pre-digital and musing over the 'pixel' would a physical measurement such as a cm work in web design at some point? Do all devices have a designated ppi (pixel per inch) value?

I know you have ems, rems, %, etc but is a cm such a bad idea? Devices do exist in the physical world after all.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney243

3 Comments

Sorted by latest first Latest Oldest Best

 

@Merenda852

You may not want to use physical units on the screen, the main reason I can think is, the vast amount of screen sizes and pixel density combinations currently available. It will be a nightmare to fix position issues in each combination available, in fact the main reason for units like rem, ems, etc. to exist is because of this paradigma.

10% popularity Vote Up Vote Down


 

@Harper654

Pixels also exist in the physical world.

The centimeter and inch measurements in CSS are for print output devices, not for screen output devices. They are for making a print stylesheet.

You don’t gain anything by talking to the screen in centimeters because fundamentally, you are making a screen rendering at the browser’s current pixel size and pixel ratio. Not knowing that pixel size and pixel ratio because you are working in centimeters doesn’t help you.

So the immutable paper size from paper design is equivalent to the immutable pixel size from screen design.

10% popularity Vote Up Vote Down


 

@Radia289

The devices are not what determines the pixel per inch value. This is determined instead by the browser used. This allows it to be more standardized, but not perfect by any means.

All browsers convert physical units like cm and in to pixel values out of necessity for display. However, their true pixel values depends on whether or not it's a high resolution device or print or low resolution device. High resolution and prints are supposed to be the same as the physical length, but it is not perfect. As for what pixel values physical lengths are converted to, you can view a full chart of conversions.

In practice, using physical units is acceptable as a scalar for pixels. But you have to keep in mind that 1in will not really be 1 inch. However, you must test the output on all the relevant platforms that interest you (possibly including print) to make sure it behaves the way you desire.

Also keep in mind that really old browsers (think IE6) cannot scale physical units when zoomed. Another potential issue is that really old monitors may not be able to send their size to the OS, which would make it impossible to use physical units as media query points on those devices.

For a more full history of the physical units conundrum, you can read this post.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme