Skip to content

[css-values] clarify that most (all?) high-dpi devices anchor on pixel, rather than physical, unit #708

Closed
@patrickhlauke

Description

@patrickhlauke

The section on absolute lengths https://drafts.csswg.org/css-values/#absolute-lengths currently contains the following:

For print media and similar high-resolution devices, the anchor unit should be one of the standard physical units (inches, centimeters, etc). For lower-resolution devices, and devices with unusual viewing distances, it is recommended instead that the anchor unit be the pixel unit. For such devices it is recommended that the pixel unit refer to the whole number of device pixels that best approximates the reference pixel.

In essence, this splits devices into "print and high resolution" on one side, and "lower-resolution and unusual viewing distances". However, most (all?) high-dpi devices (including recent desktop monitors, laptops, mobile/tablet devices) currently also anchor on the pixel unit. It seems that it's really only print media that (try to) anchor on physical units (unless I'm missing some non-print device that does this?).

I think it would be important to either rewrite this section to change the distinction, or to leave the above as is but then include a note straight after clarifying that currently even high-resolution desktops/laptops/mobiles/tablets are anchored on the pixel unit.

The reason for bringing this up is that this issue seems to constantly rear its head in discussions around being able to use absolute measures like "mm" to actually map to physical size of elements as rendered on a device (most recently I had this discussion in the mobile accessibility task force https://www.w3.org/WAI/GL/mobile-a11y-tf/wiki/Summary_of_Research_on_Touch/Pointer_Target_Size#Comparison_of_web_content_sized_in_px_and_physical_size_of_rendered_content_on_common_device_screens which led to having to demonstrate this practically using http://codepen.io/patrickhlauke/full/zqabMR/ ... and I'm aware of similar discussions under WICG in relation to large screen / TV environments)

Happy to draft a PR if this sounds like a reasonable request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions