-
-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathpostcss.config.js
More file actions
27 lines (24 loc) · 660 Bytes
/
postcss.config.js
File metadata and controls
27 lines (24 loc) · 660 Bytes
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
import prefixSelector from 'postcss-prefix-selector';
export default {
plugins: [
prefixSelector({
prefix: '.file-explorer',
transform(prefix, selector, prefixedSelector) {
// Bỏ qua các selector toàn cục
if (
selector.startsWith('html') ||
selector.startsWith('body') ||
selector.startsWith(':root') ||
selector.startsWith('*')
) {
return selector;
}
// Bỏ qua selector đã có .file-explorer
if (selector.includes('.file-explorer')) {
return selector;
}
return prefixedSelector;
},
}),
],
};