ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

REM PX

by BsWiM ST2/ST3

Allows easy conversion of rem to px and px to rem.

Details

  • 2013.11.14.02.16.09
  • github.​com
  • github.​com
  • 3 years ago
  • 15 minutes ago
  • 3 years ago

Installs

  • Total 4K
  • Win 3K
  • OS X 2K
  • Linux 209
Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9
Windows 2 2 5 6 6 6 37 2 1 2 7 2 3 10 0 1 4 8 9 2 9 2 6 12 3 7 3 6 2 4 3 4 7 7 6 5 1 5 7 5 5 6 0 2 2 4
OS X 2 0 1 2 3 4 2 1 1 2 1 1 2 1 3 0 1 2 1 2 1 0 0 0 2 3 2 5 0 0 2 1 1 3 3 2 2 1 4 3 4 3 0 0 0 2
Linux 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

REM-PX

A Sublime Text plugin that allows easy conversion of rem to px and px to rem.

Installation

You can easily install the pluing through Will Bond's excellent Package Control (https://sublime.wbond.net/). If you want to install this plugin manually for some reason, simply clone this repo into your packages directory (make sure not to put it in the user sub dir).

Instructions

Converting px to rem

  1. Select a px value (e.g. '16px')
  2. Hit ctrl+shift+r by default (cmd+shift+r on Mac OS) to convert the value to rem. (Can also be done by selecting 'Convert highlighted px to rem' under the tools menu)

Converting rem to px

  1. Select a rem value (e.g. '1rem')
  2. Hit ctrl+shift+x by default (cmd+shift+x on Mac OS) to convert the value to px. (Can also be done by selecting 'Convert highlighted rem to px' under the tools menu)

Supported Features

  • Convert px values to rem
  • Convert rem values to px
  • Checks to make sure the value is a valid px unit to convert to rem and visa versa

Notes

  1. The default size of 1rem is 16px which can be changed in the user settings.
  2. All values will remove trailing zero's (e.g. '1.500rem' would become '1.5rem').

Examples (1rem = 16px)

Example 1 (rem to px)

font-size: 1rem

Will convert to:

font-size: 16px

Example 2 (px to rem)

font-size: 16px

Will convert to: “css font-size: 1rem