This is an extension for Visual Studio Code that allows you to convert px to em, and vice versa.
Alt+Z
Px to em, and em to px. Converts selected text from px to em, and em to px.
- Px to em, and em to px. Converts selected text from px to em, and em to px.
- Px to em. Converts selected text from px to em
- em to px. Converts selected text from em to px
This extension contributes the following settings:
px-to-em.px-per-em
: number of pixels per em. Default is16px
.px-to-em.number-of-decimals-digits
: maximum number of decimals digits a px or em can havepx-to-em.only-change-first-ocurrence
: set to change all or only the first selected ocurrence of px/empx-to-em.notify-if-no-changes
: enable/disable notification that alerts the users if no conversion could be made
- If you select a value with multiple cursors it will get converted, but following cursors may change place after the conversion.
- 'Edits from command extension.pxToemAndemToPx were not applied' message appears in debug console.
- Fixed bug, minimum number of decimal was 1, not 0
- Added gif for
alt + z
keybinding
- Fixed bug where text was being selected after conversion.
- There's no need to select a value to modify it. Now you only have to have the curso next to the value.
- Modified readme
- Fixed bug, The program was not finding all the px and ems in the selections
- Introduced an option to set the maximum number of decimals digits a em and px can have
- Keybinding added
- Improved Readme, and fixed some typos
- New command that allows you to covert em and px back and forward
Initial release
Feel free to fork this repository and use it the way you like. If you want to propose a nice new feature, just create a pull request from you forked branch. My github
Enjoy!