forked from Sak32009/GetDataFromSteam-SteamDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostcss.config.js
40 lines (37 loc) · 985 Bytes
/
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
module.exports = {
plugins: [
require('@fullhuman/postcss-purgecss')({
content: [
'./src/**/*.html',
'./src/**/*.ts',
// NOTE: fix modal-backdrop(show, fade)
'./node_modules/bootstrap/js/dist/modal.js',
],
fontFace: true,
keyframes: true,
variables: true,
// NOTE: i don't use table
blocklist: ['table'],
}),
require('postcss-prefix-selector')({
prefix: '.sak32009',
transform(prefix, selector, prefixedSelector) {
// .body to .sak32009
if (selector === 'body') {
return prefix;
}
// :root to :root
if (selector === ':root') {
return selector;
}
// ::a-b-c to .sak32009 *::a-b-c
if (selector.startsWith('::')) {
return prefix + ' *' + selector;
}
// [selector] to .sak32009 [selector]
return prefixedSelector;
},
}),
require('autoprefixer'),
],
};