我想在 daisyui 中自定义一个主题。是否可以自定义,即深色主题(只需修复一种颜色,或添加更多颜色条目)?
此外:是否可以为您的自定义主题添加新的颜色条目?
即我尝试了以下但没有成功:
daisyui: {
styled: true,
themes: [
"light", // first one will be the default theme
"dark",
{
mytheme: {
primary: "#793ef9",
"new-color": "#eff1ae",
"primary-focus": "#570df8",
},
},
"cupcake",
],
},
new-color
...但是当我在我的 css ( theme("colors.new-color")
)中使用新颜色时。我收到以下错误:
(146:7) /home/armwur/code/booking-overview/src/index.css 'colors.new-color' does not exist in your theme config. 'colors' has the following valid keys: 'inherit', 'current', 'transparent', 'black', 'white', 'neutral', 'primary', 'primary-focus', 'primary-content', 'secondary', 'secondary-focus', 'secondary-content', 'accent', 'accent-focus', 'accent-content', 'neutral-focus', 'neutral-content', 'base-100', 'base-200', 'base-300', 'base-content', 'info', 'success', 'warning', 'error'
144 | }
145 | .fast-table tr:hover td {
> 146 | background-color: theme('colors.new-color');
| ^
147 | }
148 | .fast-table th, .fast-table td {
我需要添加一个自定义颜色条目。这怎么可能?