-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
50 lines (44 loc) · 1.35 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
45
46
47
48
49
50
import tailwindColors from "./node_modules/tailwindcss/colors";
const colorSafeList = [];
const deprecated = [
"lightBlue",
"warmGray",
"trueGray",
"coolGray",
"blueGray",
];
for (const colorName in tailwindColors) {
if (deprecated.includes(colorName)) continue;
const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
const pallette = tailwindColors[colorName];
if (typeof pallette === "object") {
shades.forEach((shade) => {
if (shade in pallette) {
colorSafeList.push(`text-${colorName}-${shade}`),
colorSafeList.push(`accent-${colorName}-${shade}`),
colorSafeList.push(`bg-${colorName}-${shade}`),
colorSafeList.push(`hover:bg-${colorName}-${shade}`),
colorSafeList.push(`focus:bg-${colorName}-${shade}`),
colorSafeList.push(`ring-${colorName}-${shade}`),
colorSafeList.push(`focus:ring-${colorName}-${shade}`),
colorSafeList.push(`border-${colorName}-${shade}`);
}
});
}
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
"node_modules/nuxt-ui-vue/dist/theme/*.{js,jsx,ts,tsx,vue}",
],
darkMode: "class",
safelist: colorSafeList,
theme: {
extend: {
colors: tailwindColors,
},
},
plugins: [require("@tailwindcss/forms")],
};