saadeghi / daisyui

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

bug: Theme doesn't work on some browsers #2822

Closed Elziy closed 9 months ago

Elziy commented 9 months ago

What version of daisyUI are you using?

v4.6.0

Which browsers are you seeing the problem on?

Other

Reproduction URL

There are no other problems except that the theme does not take effect

Describe your issue

The themes are normal on chrome on windows and safari on ios, but the theme selected on Xiaomi mobile browser does not take effect and the effect is the default theme.

github-actions[bot] commented 9 months ago

Thank you @Elziy 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.

saadeghi commented 9 months ago

I don't know what's the Chromium version in Mi Browser but daisyUI version 4.x uses OKLCH colors which needs Chromium 111+

Maybe updating the browser to the latest version would help.

fdarkaou commented 9 months ago

I have the same issue. I have a custom theme that is applied using the data-theme attribute. On desktop and some mobile phones it works fine, but on a lot of other mobiles it just falls back to the default light/dark themes.

This is really ruining the layout of a lot of my projects. Is there any workaround for this? I tried editing the light and dark themes but it seems the result is just the same - works on some browsers but on a lot of mobile browsers it does not ...

saadeghi commented 9 months ago

Old browsers do not support OKLCH color model and a lot of new CSS features. For those old browsers, daisyUI shows the default dark/light theme.

If you can't update the browser for some reason, you can still use daisyUI version 3.x.

MartinPavlik commented 8 months ago

Is it possible to set fallbacks in the theme so it does not look "broken" in older browsers? Thanks