-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
44 lines (41 loc) · 1.12 KB
/
tailwind.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
41
42
43
44
const { readFileSync } = require('node:fs');
const path = require('node:path');
const postcss = require('postcss');
const plugin = require('tailwindcss/plugin');
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
path.join(__dirname, './packages/renderer/index.html'),
path.join(__dirname, './packages/renderer/src/**/*.{vue,ts}'),
],
theme: {
extend: {
colors: {
primary: '#B087F4',
light: '#D7B9FF',
accent: '#8953E2',
dark: '#1C1921',
link: '#E6DBFF',
},
},
},
corePlugins: {
preflight: false,
},
plugins: [
plugin(function({ addBase }) {
const preflightStyles = postcss.parse(
readFileSync(require.resolve('tailwindcss/lib/css/preflight.css'), 'utf8'),
);
// Remove button's background preflight style because conflicting with Naive UI buttons
preflightStyles.walkRules((rule) => {
if (rule.selector.includes('button')) {
rule.walkDecls(/^background/, (decl) => {
decl.remove();
});
}
});
addBase(preflightStyles.nodes);
}),
],
};