-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapsible color transition #425
Labels
Comments
To workaround this effect: on the two inner elements |
Fixed in
Custom colors for collapse that works with focus <div tabindex="0" class="collapse group">
<div class="collapse-title bg-primary text-primary-content group-focus:bg-secondary group-focus:text-secondary-content">
Focus me to see content
</div>
<div class="collapse-content bg-primary text-primary-content group-focus:bg-secondary group-focus:text-secondary-content">
<p>tabindex="0" attribute is necessary to make the div focusable</p>
</div>
</div> Custom colors for collapse that works with checkbox <div tabindex="0" class="collapse">
<input type="checkbox" class="peer">
<div class="collapse-title bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content">
Click me to show/hide content
</div>
<div class="collapse-content bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content">
<p>tabindex="0" attribute is necessary to make the div focusable</p>
</div>
</div> |
inorganik
pushed a commit
to inorganik/daisyui
that referenced
this issue
Feb 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The collapse color change transition doesn't look so good. It looked weird at the default transition time of
0.2s
but i set it to2s
just to check what was going on.When element is not focused and closed and then gets a click:
When element is focused and closed and then gets a click:
Possibly this can not be done with CSS alone. I think in this case it's better not have separate colors for focus and non-focus by default.
https://daisyui.com/components/collapse
The text was updated successfully, but these errors were encountered: