2.0.0 • Published 3 years ago

@curiousmedia/sass-numbers v2.0.0

Weekly downloads
34
License
MIT
Repository
-
Last release
3 years ago

SASS Numbers

Simple library to manipulate numbers and units.

Examples

Unitless

num-unitless(5px); //5

Round

num-round(1.5555, 1); //1.6
num-round(1.5555, 2, 'ceil'); //1.56
num-round(1.5555, 3, 'floor'); //1.555

Em

num-em(32); // 2em
num-em(32, 8); // 4em

Rem

num-rem(32); // 2em
num-rem(32, 8); // 4em

Vw

Recommended for scaling elements using VW units.

num-vw(32); // 5vw
num-vw(32, 1024) // 2.5vw

Credits

Unitless (formerly strip-unit) by Hugo Giraudel on http://www.css-tricks.com

Round (formerly decimal-round) by Takeru Suzuki on http://gist.github.com/terkel

Em by Chris Coyier on http://www.css-tricks.com

2.0.0

3 years ago

1.3.0

3 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago