Skip to content

Commit 600ab73

Browse files
authored
fix: add transition for collapse min-height. closes: #2615
* fix(collapse): add transition for `min-height` - firefox ignores grid-row height and transitions directly to full min-height example: https://play.tailwindcss.com/9yLVxz7jaE?file=css close #2615 * tweak transition for padding - delay start and shorten the duration so that it is not so visible on the end of open/close
1 parent ce2977a commit 600ab73

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/daisyui/src/components/collapse.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@
183183
transition:
184184
content-visibility 0.2s allow-discrete,
185185
visibility 0.2s allow-discrete,
186-
padding 0.2s ease-out,
186+
min-height 0.2s ease-out allow-discrete,
187+
padding 0.1s ease-out 20ms,
187188
background-color 0.2s ease-out;
188189
}
189190
}
@@ -197,7 +198,8 @@
197198
transition:
198199
content-visibility 0.2s allow-discrete,
199200
visibility 0.2s allow-discrete,
200-
padding 0.2s ease-out,
201+
min-height 0.2s ease-out allow-discrete,
202+
padding 0.1s ease-out 20ms,
201203
background-color 0.2s ease-out,
202204
height 0.2s;
203205
height: 0;
@@ -284,6 +286,7 @@
284286
transition: background-color 0.2s ease-out;
285287
}
286288
}
289+
287290
.collapse-open {
288291
@layer daisyui.l1.l2 {
289292
grid-template-rows: max-content 1fr;

0 commit comments

Comments
 (0)