sass-functions

2.0.2 • 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

/sass-functions/

    Package Sidebar

    Install

    npm i sass-functions

    Weekly Downloads

    371

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    4.8 kB

    Total Files

    9

    Last publish

    Collaborators

    • jobemichael
    • hahiii
    • fweinrich
    • spossner
    • rejas
    • suprmax