3 ms·
Yeah. To some extent, that's outside the browser's hands - if the system doesn't know what the "real world pixel size" is (insert obligatory "of course I know p
by undecisive 4y ago
Yeah. To some extent, that's outside the browser's hands - if the system doesn't know what the "real world pixel size" is (insert obligatory "of course I know pixels don't exist" disclaimer here) then there's no way to pass that information on to the browser.
Complete side note, I'm shocked at how terribly Linux is still doing at the whole hi-dpi vs lo-dpi vs everything in between.
But yes, generally speaking the gold standard is CSS rems - it presumes that a user has somewhat configured their machine comfortably, mind. But if you use that text size as a relative measure for all the text on their screens, you can scale your interface elements knowing that if 1rem is a good readable size for a letter, all headings etc should be bigger, no interactive element should ever be smaller than 1rem (and should probably be a fair bit bigger on mobile devices), you can define margins around this measure too.
It isn't perfect, but it'll beat UA most of the time. You'll stop worrying about the definition of high res and low res, and instead focus on the comfort of the individual - which might be a bespectacled octogenarian or an impoverished student on the same system.