In a filling context, empty .shiny-html-output containers either receive gap or are included in the allocation of space in the flex container, leading to additional space that most people would not expect to appear. Consider conditional dynamic content shown in a sidebar() or conditional content shown in a card.
In the following example, the intention is to hide the reactable table unless the card is in full-screen
In a filling context, empty
.shiny-html-output
containers either receive gap or are included in the allocation of space in the flex container, leading to additional space that most people would not expect to appear. Consider conditional dynamic content shown in asidebar()
or conditional content shown in a card.In the following example, the intention is to hide the reactable table unless the card is in full-screen
The card contains an additional row of space that most people would not expect or want.
If we move the empty element out of the document flow, it's no longer accounted for in the flex calculation: