daisyui
daisyui copied to clipboard
bug: accordions and collapses don't open in safari 15.1
What version of daisyUI are you using?
v3 + v4
Which browsers are you seeing the problem on?
Safari
Reproduction URL
https://daisyui.com/components/accordion/
Describe your issue
In safari Version 15.1 (17612.2.9.1.20), accordions and collapses that use checkboxes or radio buttons don't open at all.
This is reproducible on the daisyui website from v3 and up.
I'm not sure why they don't open, but maybe we can find a fallback?
EDIT
Looks like if I add height: fit-content to the checked selector, it seems to work. We don't get a nice transition on safari but thats ok, on chrome it still works smoothly
.collapse[open]>.collapse-content,
.collapse-open>.collapse-content,
.collapse:focus:not(.collapse-close)>.collapse-content,
.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,
.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content
I'm having this problem as well. Thanks for the workaround!