1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00
copilot/ui/.postcss.js
2016-10-28 14:59:28 +01:00

26 lines
735 B
JavaScript

module.exports = function (postcss) {
return postcss([
require('postcss-import')(),
require('postcss-at-rules-variables')(),
require('postcss-modules-values'),
require('postcss-functions')({
functions: {
remCalc: function(values) {
values = values.replace('px', '');
values = values.split(' ');
let outputRems = '';
const base = 16;
values.forEach( (value, i) => {
const remValue = value / base;
outputRems += i === 0 ? `${remValue}rem` : ` ${remValue}rem`;
});
return outputRems;
}
},
}),
require('postcss-mixins')(),
require('postcss-for'),
require('postcss-cssnext')()
])
}