Proper way to disable dark mode in TW3 #6351
-
|
Is setting dark to 'class' the correct way to disable dark mode in TW3? I am using DaisyUI, which has it's own dark mode implementation. In TW2 I just set dark to false. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
-
|
Dark mode being on by default doesn't affect your CSS. It only does something when you have Unless DaisyUI relies on |
Beta Was this translation helpful? Give feedback.
-
|
My browser seems to have applied dark mode from daisyui automatically (which also happened on ios), until I specified light theme manually. |
Beta Was this translation helpful? Give feedback.
-
|
If you only want the default light theme, set themes config to false. |
Beta Was this translation helpful? Give feedback.
-
|
The following will disable the dark theme, however it's not very well documented. |
Beta Was this translation helpful? Give feedback.
-
|
or simply include only light themes // tailwind.config.js
export default {
daisyui: {
themes: ["light"]
}
} |
Beta Was this translation helpful? Give feedback.
-
|
#If you only want the default light and dark themes, set themes config to false. |
Beta Was this translation helpful? Give feedback.
Dark mode being on by default doesn't affect your CSS. It only does something when you have
dark:example-classin your code.Unless DaisyUI relies on
dark:example-classsyntax?