A simple pixel to rem converter with a minimal design.
- Both the
px
andrem
units are calculated based off thebase
size you set. (Defaults to 16px) - In order to get the
px
value, it is either 1) set by you directly or 2) calculated based off therem
value you input using the following formula:px
=rem
xbase
. - Getting the
rem
value is similar to thepx
method and is 1) set by you directly or 2) calculated based off thepx
value you input using the following formula:rem
=px
/base
.
I found myself utilizing other online resources more frequently while designing projects that aimed to use the amazing Tailwind CSS framework, however wanted something that was a bit more minimal and ad free. Also, it gave me an excuse to use Vite in a project.
- Download or clone repo
git clone https://github.com/evanspj/px2rem.git
- Go to product root directory
cd px2rem
- Run
yarn
ornpm install
to install the necessary dependencies - Start dev server:
yarn dev
ornpm run dev