-
Notifications
You must be signed in to change notification settings - Fork 18
/
postcss.config.js
50 lines (47 loc) · 1.14 KB
/
postcss.config.js
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
50
const breakpoints = require('./src/theme/breakpoints.js');
const variables = require('./src/theme/variables.js');
// prefix `--` to each breakpoint for custom variables (ex: 'md' -> '--md')
const customMedia = {};
for (let bp in breakpoints) {
customMedia[`--${bp}`] = breakpoints[bp];
}
const mixins = {
motionDefault: function(mixin, dir) {
return {
':global(.jsMotionDefault) &': {
'@mixin-content': {},
},
};
},
motionReduced: function(mixin, dir) {
return {
':global(.jsMotionReduced) &': {
'@mixin-content': {},
},
};
},
};
module.exports = {
plugins: {
'postcss-preset-env': {
features: {
'custom-media-queries': {
importFrom: {
customMedia,
},
},
'focus-within-pseudo-class': false,
},
},
'postcss-for': {},
'postcss-mixins': { mixins }, // QUESTION / REVIEW - Why isn't this working...
'postcss-random': { round: true },
'postcss-nested': {},
'postcss-simple-vars': {
variables,
},
'postcss-conditionals': {},
'postcss-calc': {},
'css-mqpacker': { sort: true },
},
};