What is visibility css property
visibility: hidden
visibility - CSS: Cascading Style Sheets | MDN
The visibility CSS property shows or hides an element without changing the layout of a document.
When I found it useful
When I wanted to keep the layout and did NOT want to have a hover effect on the element
codesanbox
Top comments (4)
And if you do want reflow, set the size to 0 percent
size: 0%
Thanks for your comment!
But, sorry I need some follow-up information here 🙇🏻♂️
Could you tell me what you meant by 'reflow' or please share a link that I can refer to.
Thanks!
normally, when you add or remove an element; the browser will rearrange(reflow) the page layout. Sometimes this is what you want; other times it is not
Thank you for explaining that!