During a development of one of my web project, I discovered the gap between DaisyUI and tailwindcss on how each handles the system's theme (via prefers-color-scheme: dark) and manual theme override (via something like [data-theme] in case to give users to override against the system theme). Although the proposed the solution from me (you can see by continouly reading this gist) is not very complex, this can be confusing for people who have no similar experience on handing these. Hence sharing it as gist.
DaisyUI (v5) and tailwindcss (v4) both work (automatically) well with prefers-color-scheme: dark (aka following OS theme).
And DaisyUI allow you to override the theme with [data-theme], which tailwindcss does not work with it unless you manually override the config as describe as https://tailwindcss.com/docs/dark-mode#using-a-data-attribute.