3 ms·
Firefox's units are quite smart, actually. 60 is divisible by 3, 4, 5 and 6, so they are quite future-proof for the future when we'll have the displays with dev
by AndriyKunitsyn 1y ago
Firefox's units are quite smart, actually. 60 is divisible by 3, 4, 5 and 6, so they are quite future-proof for the future when we'll have the displays with devicePixelRatio = 6.
- jhurliman 1y agoThe Sumerians were on to something: https://en.m.wikipedia.org/wiki/Sexagesimal https://en.m.wikipedia.org/wiki/Sexagesimal
- ahazred8ta 1y agoIn engineering, they used to use the foot ' inch '' line ''' and point '''' where each unit was 1/12th the size of the previous one. The european typographic point used to be 1/144th of an inch. Watch components are measured in points.
- chrismorgan 1y agoOne of the factors for choosing 60 was its nice divisors, perfectly handling these scaling factors (and also, I rather suspect, though it wasn’t pointed out, 1.25×, 1.5×, and 2.5×). https://wiki.mozilla.org/Mozilla2:Units#Proposal https://wiki.mozilla.org/Mozilla2:Units#Proposal describes the reasons, including others. It’s a nice piece of history to read. But we’re unlikely to get mainstream devices beyond 3×. CSS’s reference pixel has a visual angle of about 77″ <https://www.w3.org/TR/css-values-3/#reference-pixel https://www.w3.org/TR/css-values-3/#reference-pixel>. Human eyes cap out at 28″ <https://www.swift.ac.uk/about/files/vision.pdf#page=2 https://www.swift.ac.uk/about/files/vision.pdf#page=2>. This means 2.75× is the absolute limit of human resolution at a device’s nominal viewing distance, and you have to come in closer for it to even be possible to resolve a single device pixel. 6× means “you can’t even detect a single pixel until you halve the distance between eye and surface”. Are there contexts in which this could make sense? Definitely: an art display that’s intended to be viewed at a distance of 10 metres, but you can also get up close to see details—it’d be nice if you can barely make out the pixels at 1 metre. But mainstream devices? I don’t think anyone’s gone beyond 3×, and I don’t think they will. 3× is at the transition from “diminishing returns” to “no further returns are even possible, going further makes things strictly worse” (increasing monetary, power, memory and processing costs). As it stands, even the benefits of choosing 60 have turned out pretty slim; the battleground and constraints have shifted so that divisibility isn’t as important as I think it was expected to be. And it has costs, too; there’s a reason WebKit shifted to 64 after a bit, even though it doesn’t even do 1.5× perfectly, which was probably the most common factor other than 1× at the time, and is possibly even more common now.