E
E
Elisey Basenko2017-08-24 13:02:25
css
Elisey Basenko, 2017-08-24 13:02:25

Is it possible to set an absolute size relative to visual perception to an element / text?

For web development of front end interfaces.
It would be great to set the size of the text or element in strict accordance with reality, despite the different pixel densities of the screens.
Of course, this would be logical only for mobile devices and desktop monitors, but for TVs that also view the web, this would not be applicable because there the pixel density is very low with such a large diagonal.
But still, mb is a way to indicate the size at least approximately similar to the real size.
Isn't there a correlation between physical screen size and pixel density?
Apple seems to have done something similar before ... but now it's confusion again.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GreatRash, 2017-08-24
@GreatRash

Again, for the billion-first time, text size has nothing to do with pixel density .

K
Kovalsky, 2017-08-24
@lazalu68

You can, for this there are absolute units in CSS ( W3C , MDN ):
mm (millimeter), cm (centimeter), in (inch), etc.
In most cases, the accuracy of calculating these dimensions is enough, but still they warn on SO :

Result still depends on the correct reading of the monitor size by the operating system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question