-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpostcss.config.js
More file actions
22 lines (21 loc) · 889 Bytes
/
postcss.config.js
File metadata and controls
22 lines (21 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const purgecss = require('@fullhuman/postcss-purgecss');
const cssnano = require('cssnano');
const pruneVar = require('postcss-prune-var');
const varCompress = require('postcss-variable-compress');
module.exports = {
map: true,
plugins: [
purgecss({
// file paths to your contents to remove unused styles.
// content: ['js/my.js','*.php'],
// other wise our aria-selected is removed (like with purgecss online)
content : [ './theme/*.template' ],
safelist: ['main', 'container', 'article', 'nav', 'navbar', 'a', 'hljs', 'pre', 'code', 'h1', 'h2', 'h3', 'has-dropdown', 'is-hoverable', /^article-/, /^page-/, /^menu-/, /^nav-/, /^navbar-/, /^icon-/, /^hljs-/, /^social-/, /^share-/, /^wechat-/],
}),
pruneVar(), // remove unused css variables
varCompress(), // compress css variables
cssnano({
preset: 'default',
}),
],
}