The thought of 饾殝饾殬饾殯饾殟饾殠饾殯: 饾煻.饾煾饾殥饾殫 饾殝饾殨饾殜饾殞饾殧; sitting in someone's css is terrifying.
The thought of 饾殝饾殬饾殯饾殟饾殠饾殯: 饾煻.饾煾饾殥饾殫 饾殝饾殨饾殜饾殞饾殧; sitting in someone's css is terrifying.
From my own non-CSS based graphics experience, the only problem with layouts specified in absolute sizes is that small lines look really bad on standard (<100dpi) monitors if not aligned to the physical screen pixels. (Not saying that's not bad!)
On your 4k monitor 96 pixels is more than likely not an inch (unless your monitor is slightly over 42 inches), so it wont solve your small app problem in any form, it will just make things more obscure.
In addition to this, you'll also end up with many subpixel values. While this wont matter for 饾殝饾殬饾殯饾殟饾殠饾殯 in the example I posted above (as border always snaps to the nearest dp unit), it will create blurry effects on lower DPI screens for other css rules that do respect subpixel values (i.e. 饾殝饾殬饾殹-饾殰饾殤饾殜饾殟饾殬饾殸: 饾煻 饾煻 饾煻 饾煻.饾煾饾殥饾殫 #饾煻饾煻饾煻; will create a blurred border effect).
That's good to know. My 4k monitor, coincidentally, is about 40.5 inches, so CSS inches are displayed almost correctly.
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.
At least the inch is a unit whose physical size, by the name, you could assume to not change when screen resolution changes. And also, DPI (or just the physical monitor size) is usually something the user can configure in the operating system - to account for viewing distance or personal preferences.
It's not even an HTML/browser issue. There's a general problem with knowing in software the real-life physical size or length of something displayed on screen. The calibration information available isn't generally reliable, though I think people are paying more attention these days with the growing interest in AR.