1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 07:10:05 +02:00
copilot/ui/.postcss.js

26 lines
735 B
JavaScript
Raw Normal View History

2016-10-28 16:59:28 +03:00
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')()
])
}