Published: VisualStudio Marketplace - Convert px to rem
Converts unit "px" to "rem" for the selected area in the document.
- Select an area to convert within code
- Press shift + cmd + p
- Type
> convert px to rem of selections
- Press shift + cmd + p
- Type
> Preferences: Open Settings
- And you can use these options.
{
"convert-px-to-rem.base-px": 16, // set px per 1rem
"convert-px-to-rem.precision": 4 // floating point precision
}
- Shortcut
- Displaying unit before conversion.
convert-px-to-rem.basePx
: Specify the default px units used in your project.