Fix tailwind config in the best practice way
This commit is contained in:
parent
38f6d5eca9
commit
d86bf88e55
1 changed files with 9 additions and 26 deletions
|
@ -1,21 +1,4 @@
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
const allColors = require("tailwindcss/colors")
|
|
||||||
|
|
||||||
const colors = Object.keys(allColors)
|
|
||||||
.filter((key) => {
|
|
||||||
const deprecated = [
|
|
||||||
"lightBlue",
|
|
||||||
"warmGray",
|
|
||||||
"trueGray",
|
|
||||||
"coolGray",
|
|
||||||
"blueGray",
|
|
||||||
]
|
|
||||||
return !deprecated.find((val) => val === key)
|
|
||||||
})
|
|
||||||
.reduce((acc, key) => {
|
|
||||||
acc[key] = allColors[key]
|
|
||||||
return acc
|
|
||||||
}, {})
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: [
|
content: [
|
||||||
|
@ -23,16 +6,16 @@ module.exports = {
|
||||||
"./components/**/*.{js,ts,jsx,tsx}",
|
"./components/**/*.{js,ts,jsx,tsx}",
|
||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
colors: {
|
extend: {
|
||||||
...colors,
|
colors: {
|
||||||
theme: "#282c34",
|
theme: "#282c34",
|
||||||
grayish: "#b1b2b5cc",
|
grayish: "#b1b2b5cc",
|
||||||
warn: "#fabd04",
|
warn: "#fabd04",
|
||||||
voidDark: "#000c",
|
voidDark: "#000c",
|
||||||
"shield-gray": "#616161",
|
"shield-gray": "#616161",
|
||||||
"shield-lightgray": "#989898",
|
"shield-lightgray": "#989898",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
extend: {},
|
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue