On the web, inches don't actually work based on physical inches, they're just another pixel measurement. But assuming they did work on physical inches, they still wouldn't capture how close the device was going to be to your face, what the pixel density/brightness was, anything like that.
For the most part, use percentage, `em`, or `rem`. This is based off the the font size, which is more accessible (your app will still look good if someone with poor eyesight changes the font size). It'll also mean your app works well with fractional scaling out of the box. I believe that most desktop-level graphics frameworks like GTK support `em` units. At the very least, on the web, avoid pixel measurement in most cases.
It turns out that device font-size is a good measurement to capture most of the variable parts of user experience -- a pixel dense device that's held close to your eyes will have a small font size, a high resolution monitor that's farther away will have a larger font size -- and `em` will work great in both cases.