A simple pixel to rem converter with a minimal design.
- Both the
pxandremunits are calculated based off thebasesize you set. (Defaults to 16px) - In order to get the
pxvalue, it is either 1) set by you directly or 2) calculated based off theremvalue you input using the following formula:px=remxbase. - Getting the
remvalue is similar to thepxmethod and is 1) set by you directly or 2) calculated based off thepxvalue 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
yarnornpm installto install the necessary dependencies - Start dev server:
yarn devornpm run dev
