Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 340 Bytes

File metadata and controls

23 lines (17 loc) · 340 Bytes

pxrem

Easily convert pixels to rem.

Usage

# get the rem value, given a pixel value
> pxrem 19
1.1875

# specify the number of decimal places to return (default: 8)
> pxrem 19 -p 2
1.19

# specify the base pixel size to use (default: 16px)
> pxrem 19 -b 10
1.9

# get the pixel value for a given rem value
> pxrem 2.25 -r
36