tabs
tabs copied to clipboard
Nav Scroll tabs breaks flex layouts
I've seen that it's using width: 99999px;
by design to implement the scroll but this causes some issues when using the tabs inside a flex container.
We can reproduce this in the rc-tabs docs.
http://react-component.github.io/tabs/examples/activeKey.html
Change the container to display flex and add some padding like this:
You can see that the content inside the tab isn't respecting the padding of the container and it goes beyond the size of the page.
Removing the width on .rc-tabs-nav-scroll
fixes the issue:
Note that this is actually really important, if there's any div that uses %
widths inside the content or anything with position absolute, it'll be completely broken, the same applies to any kind of grid layout inside that.