Strange behaviour with changing display from none to block

Hello Theme-X team!

I want to toggle an html element with jquery. But there is a strange behaviour.
I added a class called “hide” and added it to all the rows I want to hide until a button will be clicked.
In the row I am using the x-element “x-card”. When I toggle the class and the attribute display: none; is changed to display: block; the x-card has no height until I resize the browser.

Is there a way to make the hide and show work without issues?

Best wishes
Christian

Hi There,

Try display: initial instead of display: block

Let us know how it goes