Dark mode overrides not working like I expected #597
-
daisyui: {
themes: [
{
light: {
...require('daisyui/src/colors/themes')['[data-theme=corporate]'],
primary: '#104060',
secondary: '#0a2440',
}
},
{
dark: {
...require('daisyui/src/colors/themes')['[data-theme=dark]'],
primary: '#0a2440',
secondary: '#104060',
}
},
],
}, Overriding a couple of colors in my light theme works great however if I want to swap those in the dark theme, it's not working the same. I've tried looking through docs (https://daisyui.com/docs/themes/) but can't seem to find what I need to get this to work the way I want. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'll read up more in https://daisyui.com/docs/colors/, maybe I should be setting `[primary|secondary]-content explicitly. |
Beta Was this translation helpful? Give feedback.
-
Your config is okay and this is the result you should be seeing: https://play.tailwindcss.com/kBllfeLRx4 |
Beta Was this translation helpful? Give feedback.
Your config is okay and this is the result you should be seeing: https://play.tailwindcss.com/kBllfeLRx4
I can't be sure unless I see your page but I guess you're using a theme only for a section (not the root element) and if that's the case, you should also add
bg-base-100 text-base-content
classes to give that section background color and text color of current theme.