Skip to content

Rohit-B-Kadam/vscode-px-to-viewport-extension

Repository files navigation

px to viewport

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.

Usage

Keybindings

  • 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.

Commands (ctrl+shift+p)

  • 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.

Extension Settings

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.

Release Notes

0.0.2

Initial release of px-to-viewport


Github

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published