DEV Community

Samandar Ravshanov
Samandar Ravshanov

Posted on

📦CSS unit converter

from functorflow import ff, f

# CSS unit converter: px, cm, mm, in, pt, pc, deg, grad, rad, turn, s, ms, Hz, kHz, dpi, dpcm, dppx.

# ---- ff 

# px to cm
r = ff('css-unit').cm(px=10)
print(r) # 0.26458

# ----- f

# px to cm
r = ff('css-unit.cm', px=10)
print(r) # 0.26458

Enter fullscreen mode Exit fullscreen mode

Stop wasting time installing and configuring Python libraries. Use them right away. 📦FunctorFlow instantly auto-install and auto-config them for you.

Top comments (0)