Wondering what’s next for npm?Check out our public roadmap! »

    @curiousmedia/sass-numbers

    1.3.0 • Public • Published

    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

    Keywords

    none

    Install

    npm i @curiousmedia/sass-numbers

    DownloadsWeekly Downloads

    45

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    4.24 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar