summaryrefslogtreecommitdiff
path: root/assets/css/postcss.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/css/postcss.config.js')
-rw-r--r--assets/css/postcss.config.js33
1 files changed, 12 insertions, 21 deletions
diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js
index f5f96f7..e0d897c 100644
--- a/assets/css/postcss.config.js
+++ b/assets/css/postcss.config.js
@@ -1,37 +1,28 @@
-const { postcssFontGrabber } = require('postcss-font-grabber')
-
module.exports = conf => {
- const scss = conf.file.extname === '.scss';
-
return {
- parser: 'postcss-scss',
plugins: [
- require('postcss-easy-import')({
- prefix: '_',
- extensions: ['.scss'],
- }),
+ // converts googleapis URLs to gstatic ones
require('postcss-import-url')({
recursive: true,
modernBrowser: true,
}),
+ // downloads gstatic fonts for local serving
+ require('postcss-font-grabber').postcssFontGrabber({
+ cssSrc: 'src',
+ cssDest: 'css',
+ fontDest: 'fonts',
+ }),
+ // main compatibility phase
require('postcss-preset-env')({
- browsers: 'last 4 versions',
stage: 3,
}),
- // mixins must come before simple-vars and nested
- require('postcss-sassy-mixins')(),
- require('postcss-simple-vars')(),
- require('postcss-nested')(),
- postcssFontGrabber({
- cssSrc: './scss/',
- cssDest: './out',
- fontDest: './out/fonts',
- }),
+ // must be run before autoprefixer
+ require('postcss-unprefix')(),
+ require('autoprefixer')(),
+ // does not /add/ prefixes by default, hence previous step
require('cssnano')({
preset: 'advanced'
}),
]
-
};
-
};