px2rem2px
v1.0.2
Published
Convert pixel (px) to rem and rem to pixel (px)
Downloads
10
Maintainers
Readme
Pixel to REM and REM to Pixel (px2rem2px)
Overview
NPM package that simply converts pixel to REM and/or pixel to REM.
Installation
npm i px2rem2px --save
Setup and basic usage
const { pxToRem, remToPx } = require('px2rem2px')
// OR
import { pxToRem, remToPx } from 'px2rem2px'
console.log(pxToRem(3))
// 0.188rem
console.log(remToPx(3.33))
// 53.28px
Contribute
Feel free to clone or fork this project: https://github.com/deanilvincent/px2rem2px.git
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Feel free to clone or fork this project: https://github.com/deanilvincent/px2rem2px.git