-
Notifications
You must be signed in to change notification settings - Fork 0
/
postcss.config.js
37 lines (36 loc) · 1.08 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
const pkg = require('./package.json');
module.exports = ({ file, options, env }) => ({
plugins: {
autoprefixer: {
Browserslist: pkg.browserslist
},
pixrem: {},
'pleeease-filters': {},
'postcss-advanced-variables': {},
'postcss-calc': {},
'postcss-color-function': {},
'postcss-custom-media': { importFrom: './src/styles/viewports.css' },
'postcss-custom-properties': { preserve: false, importFrom: './src/styles/variables.css' },
'postcss-custom-selectors': {},
'postcss-extend': {},
'postcss-flexbugs-fixes': {},
'postcss-functions': {
functions: {
getLetterSpacing: (tracking, fontSize) => {
return `${tracking / (fontSize * 16) * 1}em`;
}
}
},
'postcss-global-import': {},
'postcss-hexrgba': {},
'postcss-import': { root: file.dirname },
'postcss-media-minmax': {},
'postcss-mixins': {},
'postcss-nesting': {},
'postcss-nested': {},
'postcss-percentage': {},
'postcss-selector-matches': {},
'postcss-selector-not': {},
'postcss-simple-vars': {}
}
});