Re: [csswg-drafts] [css-values] Ability to address actual physical size (#614)

On screens, authors *always* want and expect `1px` to be an integer number of device pixels. Even if the device, OS and browser know the screenʼs exact dimensions and thus its resolution (or rather _granularity_), we could still not anchor `mm`, `in` etc. on this physical-world measure, because the 4:3 pixel to point ratio has been made sacrosanct years ago (decades by now, actually), i.e. they must not be decoupled.

Anyway, an environment variable might solve most use cases indeed. 
Alas, `calc(1px * (1dppx / env(device-pixel-resolution)))` does not seem very elegant. Iʼd want it to be a `<number>`, which can be used verbatim as a multiplier or divisor with a `<length>`, e.g. `calc(5mm * env(foo-ratio, 1))`. It might also need to come in horizontal and vertical variants, because not all pixels are square.

-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/614#issuecomment-610424211 using your GitHub account

Received on Tuesday, 7 April 2020 14:36:21 UTC