I'm currently developing a web design that includes a section with both visible and hidden content. I've added a button to smoothly reveal the hidden content using a transition effect. However, I'm encountering a couple of challenges:
Even though the expandable feature is functional, the transition effect isn't as seamless as I'd prefer. I've utilized a CSS transition to modify the grid-template-rows property, but it's not delivering the level of smoothness I desire. How can I enhance the transition effect when revealing the hidden content?
Grid Row-Gap Reservation: The hidden content is organized in a grid layout, and despite being hidden, the row-gap seems to be reserving unnecessary space, resulting in a visual gap in the design. I aim to avoid this row-gap reservation for hidden elements. How can I adjust my CSS to ensure that the row-gap only applies to visible elements and not hidden ones?
Here is a simplified version of the HTML, CSS, and JavaScript code I'm working with: https://codepen.io/korneliuszburian/pen/LYaqyvN