@RazaAbbas62
Posted
Consider using the CSS max-height
property for the transition instead of directly manipulating the height
property. This approach allows for a smoother expand/collapse transition without the snapping behavior. Additionally, you can utilize the transform property with scaleY(0)
for collapsing and scaleY(1)
for expanding to handle the visibility while avoiding the space issue.
I hope this will help.
Happy Coding:)
Marked as helpful
@theYuun
Posted
@FazeenIjaz I ended up using the max-height
property, since the scaleY()
left a bunch of whitespace where the text would be. Maybe I should do the scaling on a more parental object.
Whichever way it's supposed to be done, I'm cool with the max-height
method. Thank you for the feedback :)