How to customize/ovrride the --menu-active-fg/bg value in the theme files? #3884
Replies: 5 comments
-
|
I too would like to know how to override the colors for menu-active |
Beta Was this translation helpful? Give feedback.
-
|
Set the value on your element: https://play.tailwindcss.com/XVWm7f7QlK?file=css |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the play example to show how this should work. However, I'm using tailwind css first which mean i dont have a CSS file as such, not do I @import tailwindcss
Is there a way to get the same outcome with this approach ? |
Beta Was this translation helpful? Give feedback.
-
|
Write the css rule in your stylesheet |
Beta Was this translation helpful? Give feedback.
-
|
Maybe the best way: @plugin "daisyui/theme" {
name: light;
/* ... */
--color-menu-active-bg: oklch(55% 0.3 240);
--color-menu-active-fg: oklch(98% 0.01 240);
}
@plugin "daisyui/theme" {
name: 'dark';
/* ... */
color-scheme: dark;
--color-menu-active-bg: oklch(70% 0.15 240);
--color-menu-active-fg: oklch(95% 0.01 240);
}
.menu {
--menu-active-bg: var(--color-menu-active-bg);
--menu-active-fg: var(--color-menu-active-fg);
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Variable
--menu-active-fg/bgis refer to--color-neutral-content/--color-neutralin menu component, how to specify new values instead of changing--color-neutral-content/--color-neutral?This is not working.
Beta Was this translation helpful? Give feedback.
All reactions