Neatly Packaged Magic

    sass-functions

    2.0.1 • Public • Published

    Sass functions

    A collection of javascript functions to extend functionality of node-sass.

    Usage:

    npm install --save sass-functions

    then at your compilation step pass options like this:

    {
      //...
      functions: {
        ...require('sass-functions/replace')(),
        //...
      },
      //...
    }
    

    replace($pattern, $string, $replacement)

    Adds a string replace function that takes a pattern (string or regular expression), a string to replace values in and what to use as the replacement (supports things like $1 for capture groups).

    image-size($url)

    Generator takes a required publicRoot option that is used as a base path to look for all of the images. Returns a map with keys width and height.

    Takes optional alias property to use along with webpack aliases to resolve paths to files

    MIT License

    Install

    npm i sass-functions

    DownloadsWeekly Downloads

    16

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    4.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • zeitwidrig
    • iamuchejude
    • eliasbraun
    • peterhassler
    • ozerovs
    • suprmax