fix(theme plugin): use prefix to generate custom theme blocks#4514
fix(theme plugin): use prefix to generate custom theme blocks#4514pdanpdan wants to merge 1 commit into
Conversation
`daisyui/theme` plugin now: - tries to read and use the `root` option (but it is not the option passed to the `daisyui` plugin, it must be passed to the `daisyui/theme` plugin) - does not use the `prefix` option I cannot find a way to use the same options in both plugins, so what this fixes is: - to also use the `prefix` option (both `root` and `prefix` options must be passed to the `daisyui/theme` plugin) There are also some small tweaks: - consistency in quoting theme names - remove redundant checking if root is ':root' to build the dark-mode selector ref saadeghi#4513 example of bad behavior: https://play.tailwindcss.com/dwkjhIRnuv?file=css
|
A fixed play (after the changes in this PR) would need to include the @saadeghi do you have a solution for sharing the options from the call to the |
You mean using the prefix defined in |
|
Yes |
|
I don't think so. Unless we read the file manually instead of using the Tailwind API, but that would create more problems which is not worth it. By the way, do we need prefix for the themes? I'm trying to understand in what situation this would be helpful. |
|
The themes set |
daisyui/themeplugin now:rootoption (but it is not the option passed to thedaisyuiplugin, it must be passed to thedaisyui/themeplugin)prefixoptionI cannot find a way to use the same options in both plugins, so what this fixes is:
prefixoption (bothrootandprefixoptions must be passed to thedaisyui/themeplugin)There are also some small tweaks:
ref #4513
example of bad behavior: https://play.tailwindcss.com/dwkjhIRnuv?file=css
The code generated by the example (only relevant parts):