Reproduction URL (Required)
https://play.tailwindcss.com/tc1fOy67iY?file=css
What version of daisyUI are you using?
v5.5.5
Which browsers are you seeing the problem on?
All browsers
Describe your issue
I want to set a custom background color on my pages that isn't --color-base-100 so I am following the documentation and adding the following to my theme:
@plugin "daisyui" {
exclude: rootcolor;
};
Then in my own CSS file I add:
@layer base {
:root {
background-color: var(--color-base-300);
}
}
However the background color remains --color-base-100 even when I exclude the rootcolor component.
On investigation it turns out that the rootscrollgutter component sets the root background-color as well, which (in my opinion) violates the single-responsibility principle, and is unexpected/undocumented.
|
:root:root { |
|
background: var(--page-scroll-bg, var(--root-bg, var(--color-base-100))); |
|
} |
I think this is a bug because unless I also exclude the rootscrollgutter component, I cannot override DaisyUI's logic that the root background color must be --color-base-100 by excluding the rootcolor component as the docs indicate.
Reproduction URL (Required)
https://play.tailwindcss.com/tc1fOy67iY?file=css
What version of daisyUI are you using?
v5.5.5
Which browsers are you seeing the problem on?
All browsers
Describe your issue
I want to set a custom background color on my pages that isn't
--color-base-100so I am following the documentation and adding the following to my theme:Then in my own CSS file I add:
However the background color remains
--color-base-100even when I exclude therootcolorcomponent.On investigation it turns out that the
rootscrollguttercomponent sets the rootbackground-coloras well, which (in my opinion) violates the single-responsibility principle, and is unexpected/undocumented.daisyui/packages/daisyui/src/base/rootscrollgutter.css
Lines 16 to 18 in 1b03aa3
I think this is a bug because unless I also exclude the
rootscrollguttercomponent, I cannot override DaisyUI's logic that the root background color must be--color-base-100by excluding therootcolorcomponent as the docs indicate.