Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>px2rem+New to Visual Studio Code? Get it now.
px2rem+

px2rem+

Hex

|
4,624 installs
| (5) | Free
Convert px to rem extension for Visual Studio Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

px2rem+ extension

Convert px to rem extension for Visual Studio Code.

Autocomplete

Convert in buffer

Convert all text or selected text. Using the shortcut ctrl-alt-r.

Settings

Sets the base pixel size of the current file. Using the shortcut ctrl-alt-p.

Comments

Support for adding comments, e.g. /* 100/75 */

Preserve leading zero

Keep the leading zero for converted values < 1. E.g. 0.5rem (preserved) vs .5rem (not preserved)

Using vw and vh

Support for using vw and vh instead of rem, using the base pixel size, but only in autocomplete.

To use this feature, set base pixel size config to proper value, eg: 7.5, and enable useVwAndVh, boom, magic happens。

Two-way Conversion

Support to convert rem to px, using the base pixel size, but only in autocomplete.

Demo

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft