|
1 | | -/* eslint-disable no-unused-expressions */ |
2 | | -import tailwindColors from './node_modules/tailwindcss/colors' |
3 | | - |
4 | | -const colorSafeList = [] |
5 | | - |
6 | | -const deprecated = ['lightBlue', 'warmGray', 'trueGray', 'coolGray', 'blueGray'] |
7 | | - |
8 | | -for (const colorName in tailwindColors) { |
9 | | - if (deprecated.includes(colorName)) |
10 | | - continue |
11 | | - |
12 | | - const shades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900] |
13 | | - |
14 | | - const pallette = tailwindColors[colorName] |
15 | | - |
16 | | - if (typeof pallette === 'object') { |
17 | | - shades.forEach((shade) => { |
18 | | - if (shade in pallette) { |
19 | | - colorSafeList.push(`text-${colorName}-${shade}`), |
20 | | - colorSafeList.push(`accent-${colorName}-${shade}`), |
21 | | - colorSafeList.push(`bg-${colorName}-${shade}`), |
22 | | - colorSafeList.push(`hover:enabled:bg-${colorName}-${shade}`), |
23 | | - colorSafeList.push(`focus:bg-${colorName}-${shade}`), |
24 | | - colorSafeList.push(`ring-${colorName}-${shade}`), |
25 | | - colorSafeList.push(`focus:ring-${colorName}-${shade}`), |
26 | | - colorSafeList.push(`border-${colorName}-${shade}`) |
27 | | - } |
28 | | - }) |
29 | | - } |
30 | | -} |
31 | 1 | /** @type {import('tailwindcss').Config} */ |
32 | 2 | module.exports = { |
33 | 3 | content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], |
34 | 4 | darkMode: 'class', |
35 | | - safelist: colorSafeList, |
36 | 5 | theme: { |
37 | 6 | extend: { |
38 | | - colors: tailwindColors, |
39 | 7 | backgroundColor: ['disabled'], |
40 | 8 | textColor: ['disabled'], |
41 | 9 | fontFamily: { |
42 | 10 | Roboto: 'Roboto', |
43 | 11 | }, |
44 | 12 | }, |
45 | 13 | }, |
46 | | - plugins: [require('@tailwindcss/forms')], |
| 14 | + plugins: [], |
47 | 15 | } |
0 commit comments