Skip to content

Instantly share code, notes, and snippets.

@lavezzi1
Created October 9, 2016 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lavezzi1/f706711ad47813b5bff2ab6365b6c0aa to your computer and use it in GitHub Desktop.
Save lavezzi1/f706711ad47813b5bff2ab6365b6c0aa to your computer and use it in GitHub Desktop.
module.exports = {
plugins: [
require('postcss-import')(),
require('postcss-nested')(),
require('postcss-simple-vars'),
require('postcss-cssnext')({
warnForDuplicates: false
}),
require('postcss-calc'),
require('postcss-functions')({
functions: {
darken: function (value, frac) {
var hsla = color(value).toHslaArray();
hsla[2] = Math.round(Math.max(Math.min(100, hsla[2] - hsla[2] * frac), 0));
return color().fromHsla(hsla).toHexString();
}
}
}),
require('lost')
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment