What I built
Added a CSS Unit Converter to devnestio.
👉 https://css-unit-converter-edi.pages.dev
Enter a value, pick a unit, and instantly see conversions to all 10 CSS units. Configurable base font size, viewport, and parent size.
Supported Units
-
pxPixels (absolute) -
emRelative to parent font size -
remRelative to root font size -
vwPercent of viewport width -
vhPercent of viewport height -
%Percent of parent element -
ptPoints (1pt = 1/72 in) -
cmCentimeters -
mmMillimeters -
inInches
Features
- Live conversion — all 10 units update as you type
- Configurable base font size, viewport width/height, parent element size
- Copy any value as a CSS-ready string (e.g. 1rem, 14.4vw)
- Formula panel showing the math for each conversion
- Source unit highlighted
Tech
- Pure Vanilla JS, zero dependencies
- 87 Node.js assert tests covering all conversion formulas and round-trips
- Single HTML file, hosted on Cloudflare Pages
Try it
All tools: https://devnestio.pages.dev
Top comments (0)