saadeghi / daisyui

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

Prevent height change in Collapse component title #3144

Open figureone opened 4 months ago

figureone commented 4 months ago

When toggling show/hide, if the title has a different background color than the content, and if there is lengthy content, you can see the title row/track grow during the animation before returning to its original size. Using max-content instead of auto in the grid-template-rows rules should lock the height of the title, so only the 2nd row (content) changes from 0fr to 1fr.

Original issue:

https://github.com/user-attachments/assets/a56c62ec-7ed7-4dfe-ab03-6ad1bdec2bcb

With the style change in this pull request:

https://github.com/user-attachments/assets/def5447c-3d69-40e2-a15e-c31fe6bc0a4c

Thanks for considering, love the component library!

vercel[bot] commented 4 months ago

@figureone is attempting to deploy a commit to the Pouya Team on Vercel.

A member of the Team first needs to authorize it.