Plugin: CSS Unit Converter v1.0

Browse, download and discuss plugins for Blumentals code editors

Plugin: CSS Unit Converter v1.0

Postby pmk65 » Mon May 25, 2015 7:47 pm

WeBuilder Plugin: CSS Unit Converter v1.0


Convert stylesheet units from one format to another.
Can convert a pixel based stylesheet into em, rem, vmax, vmin etc, or the other way around.
Can also be used to scale the current units.

Code fully commented, so it might be useful as reference for other plugin authors ;)

1) Download plugin .ZIP file.
2) Open WeBuilder and select "Plugins -> Manage Plugins" from the menu.
3) Click "Install" and select the .ZIP file you downloaded in step 1.

1) Select a block of CSS code.
2) Activate the plugin from the "Plugins" menu or press the hotkey CTRL-ALT-U
3) Fill in the values for your conversion and click the "OK" Button.

How it works:
It finds the selected CSS unit and divides the number with the "Base Size" using formula: NewSize = UnitSize/BaseSize.
(If "Invert base size" is checked, then the formula is: NewSize = UnitSize*BaseSize.)

Feedback appreciated. ;)
(I only use WeBuilder, so I haven't tested if it works in HTMLPad, Rapid CSS or Rapid PHP.)
CSS Unit
(4.49 KiB) Downloaded 149 times
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
Posts: 608
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder

Who is online

Users browsing this forum: No registered users and 1 guest