saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.13k stars 1.3k forks source link

bug: themes that change the default font conflicts with the ones that does not. #3272

Open dlgiovani opened 1 week ago

dlgiovani commented 1 week ago

What version of daisyUI are you using?

v4.12.14

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://play.tailwindcss.com/lRO0Xn8ZBy

Describe your issue

Problem:

Themes such as wireframe and cyberpunk that changes the default font will also change the font of children elements that have another data-theme that does not change the default font.

For example, if you have this:

<div data-theme="wireframe">
  <p>Hello</p>
  <!-- this font will be serif, as expected, from the theme "wireframe" -->

  <p data-theme="dark">World</p>
  <!-- this font will ALSO be serif, which is NOT expected for the theme "dark" -->
</div>

This seems to only occur when the parent data-theme has an explicit change to the default font, in other words, having a dark themed parent won't affect the wireframe themed children.

github-actions[bot] commented 1 week ago

Thank you @dlgiovani for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.