【更新】解决tailwindcss控制台警告

pull/103/head^2
xlzy 2023-03-26 13:07:11 +08:00 committed by 小诺
parent c2041c2782
commit fa6a10e7cd
1 changed files with 11 additions and 1 deletions

View File

@ -28,6 +28,16 @@ const generateFontSize = () => {
const colors = require('tailwindcss/colors')
const filterWarnColors = (colors) => {
const result = {}
for (const key in colors) {
if (['lightBlue', 'warmGray', 'trueGray', 'coolGray', 'blueGray'].indexOf(key) === -1) {
result[key] = colors[key]
}
}
return result
}
module.exports = {
content: ['./src/**/*.vue', './src/**/*.js'],
darkMode: 'class', // or 'media' or 'class'
@ -39,7 +49,7 @@ module.exports = {
colors: {
transparent: 'transparent',
current: 'currentColor',
...colors,
...filterWarnColors(colors),
...generatePrimaryColors()
},
fontWeight: {