For my website I want to create some divs that measure roughly 1cmx1cm in smartphones and 1.5cmx1.5cm in tablets and computers. (I'd pick a width and height for several dpi intervals)
From what I've read and if I understood it correctly just querying the resolution won't work, some high dpi smartphones have almost the same resolution as some computers.
1 - But from all the examples I found, most people query px and don't query using dpi, why is that?
2 - In high dpi computer screens we now use the Desktop Display Scaling, so how to know when the browser is scaled?
3 - Is there a way to do this?
Edit: I won't use in any way centimeters, I'll use certain px or % for several dpi intervals. I used the cm as a way to show why I need to query in dpi.