This is an extension for Visual Studio Code that allows you to convert px to viewport (vh and vw), convert px to min(**vw, **vh) and convert px to rem.
- Alt+Shift+W : Converts selected text from px to vw (Viewport Width).
- Alt+Shift+H : Converts selected text from px to vh (Viewport Height).
- Alt+Shift+M : Converts selected text from px to min(**vw, **vh).
- Alt+Shift+R : Converts selected text from px to rem.
- Convert px to vw : Converts selected text from px to vw (Viewport Width).
- Convert px to vh : Converts selected text from px to vh (Viewport Height).
- Convert px to min(**vw, **vh) : Converts selected text from px to min(**vw, **vh).
- Set Viewport Size : Set screen width and height in pixel.
- Set Root Font-Size (rem) : Set root font-size in pixel.
This extension contributes the following settings:
px-to-viewport.viewportWidth
: number of viewportWidth in px. Default is 720px.px-to-viewport.viewportHeight
: number of viewportHeight in px. Default is 480px.px-to-viewport.rootFontSize
: number of rootFontSize in px. Default is 16px.px-to-viewport.unitPrecision
: maximum number of decimals digits a px or vw can have. Default is 2.
Initial release of px-to-viewport
https://github.com/Rohit-B-Kadam/vscode-px-to-viewport-extension If you have any issue or you want to add new feature create a new issue on above github repo
Enjoy!