svelte-virtual-table icon indicating copy to clipboard operation
svelte-virtual-table copied to clipboard

fix an issue with tailwindcss

Open ImBada opened this issue 7 months ago • 3 comments

fix an issue #13

ImBada avatar May 26 '25 18:05 ImBada

Thank you for your contribution.

If I remember correctly, with this change, the computation will not work correctly anymore, because the border heights will simultaneously count towards one and the other row height. Use the requireBorderCollapse property instead, since that switches the way the computation works, see here.

Feel free to suggest a change in the documentation if you agree and think that it was not yet documented properly.

On a side note, I would have recommended to simply override this styling in your own stylesheet (you can e.g. add a class to the table and refer to it that way), rather than requiring every user of this library to have that styling, it's not like everyone is using tailwindcss.

GenieTim avatar May 27 '25 07:05 GenieTim

In my case, toggling requireBorderCollapse didn’t work well, so I analyzed each affecting style declaration and realized that fixing this improves the situation. This might only apply when using Tailwind CSS.

I will look for a better solution!

ImBada avatar May 27 '25 07:05 ImBada

I will look for a better solution!

You get this solution also e.g. using

<VirtualTable className={myClass} …

<!-- some other code -->

<style>
.myClass {
border-collapse: initial !important;
}
</style>

GenieTim avatar May 27 '25 07:05 GenieTim