Hi @arturpawlowski5 nice work on this one.
Setting heights on elements is generally best avoided where possible. As you've seen it can solve one problem but create a whole host of others. Also transitioning height
can cause a few performance issues and all the other elements to adjust position (jank), which is not ideal.
I would consider trying the details
and summary
tags as and alternative to the dl
option. These tags have a lot of the functionality you are looking for built in, and will solve your height issues. If you combine this with some styles to the ::marker
pseudo element you can make it look nice too!
I recently used these tags on this page and I found it worked well. https://frontend-mentor-coffeeroasters.vercel.app/plan.html
Keep up the good work!!