Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 685 Bytes

units.md

File metadata and controls

29 lines (21 loc) · 685 Bytes

.units Addon

Inspired by electron-css.

Functions for adding units to your numbers.

nano.px(36);    // 36px
nano.em(1);     // 1em
nano.pct(25);   // 25%
nano.inch(3);   // 3in
// ...

Supports all CSS units and has to special functions .pct() and .inch() for % and in, respectively.

All functions are also available as a separate .units property.

nano.units.px(36);    // 36px
nano.units.em(1);     // 1em
nano.units.pct(25);   // 25%
nano.units.inch(3);   // 3in
// ...

Installation

Simply install units addon. Read more about the Addon Installation.