[1.6.0] Should space-y-x add margin for hidden? #2095
-
For example, there is a list like this: <div class="flex flex-col space-y-32">
<div class="flex flex-col space-y-32">
<div><!-- ... --></div>
<div><!-- ... --></div>
<div><!-- ... --></div>
</div>
<div class="flex flex-col space-y-32">
<div><!-- ... --></div>
<div><!-- ... --></div>
<div><!-- ... --></div>
</div>
</div> But sometimes I need to hide the nested list wrapper as it is empty: <div class="flex flex-col space-y-32">
<div class="flex flex-col space-y-32">
<div><!-- ... --></div>
<div><!-- ... --></div>
<div><!-- ... --></div>
</div>
<div class="hidden"></div>
</div> Now space-y sees hidden and adds margin to it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I ran into a similar issue when adding a |
Beta Was this translation helpful? Give feedback.
-
Best solution is to not include hidden elements in the same parent. Wrap the elements that need to be spaced with their own |
Beta Was this translation helpful? Give feedback.
Best solution is to not include hidden elements in the same parent. Wrap the elements that need to be spaced with their own
div
and keep the hidden stuff out.