I built Check My Ring Size , a free tool where you hold a ring up to your screen and match it to a circle. It sounds like a weekend project. The hard part is one sentence: a web page has no way to ask how big a millimeter is.
If a circle is drawn 104 pixels wide, nothing in the browser tells you whether that is 17 mm on someone's phone or 30 mm on an old monitor. A ring that is 17.3 mm across (a US size 7) has to be drawn at exactly the right size, or the whole tool is worthless. This post is about how I solved that, and the bug that made my first version wrong by a factor of two to three.
Why CSS units don't help
CSS has mm and in, so it is tempting to write width: 17.3mm and move on. Don't. By definition, a CSS inch is 96 CSS pixels, and that is a reference value, not a measurement of your actual screen. On a real display, 17.3mm renders at whatever size the OS and panel happen to produce.…