forked from gitterHQ/sidecar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostcss-plugin-stack.js
More file actions
49 lines (46 loc) · 1.19 KB
/
Copy pathpostcss-plugin-stack.js
File metadata and controls
49 lines (46 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var postcss = require('postcss');
var context = require('postcss-plugin-context');
var atImport = require('postcss-import');
var mixins = require('postcss-mixins');
var simpleVariables = require('postcss-simple-vars');
var writeSvg = require('postcss-write-svg');
var nested = require('postcss-nested');
var cssvariables = require('postcss-css-variables');
var calc = require('postcss-calc');
var reporter = require('postcss-reporter');
var autoprefixer = require('autoprefixer');
var csswring = require('csswring');
var borderBox = postcss.plugin('postcss-border-box', function (opts) {
opts = opts || {};
return function(css) {
css.eachRule(function(rule) {
var decl = postcss.decl({
prop: 'box-sizing',
value: 'border-box'
});
rule.prepend(decl);
});
};
});
module.exports = function() {
return [
atImport(),
mixins(),
simpleVariables(),
writeSvg({
// For IE support
encoding: 'base64'
}),
nested(),
cssvariables(),
calc(),
context({
'border-box': borderBox
}),
autoprefixer(),
csswring(),
reporter({
//clearMessages: true
})
];
};