How to customize/ovrride the --menu-active-fg/bg value in the theme files? #3884
Unanswered
frankchen211
asked this question in
Q&A
Replies: 5 comments
|
I too would like to know how to override the colors for menu-active |
0 replies
|
Set the value on your element: https://play.tailwindcss.com/XVWm7f7QlK?file=css |
0 replies
|
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 ? |
0 replies
|
Write the css rule in your stylesheet |
0 replies
|
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);
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
All reactions