tabs icon indicating copy to clipboard operation
tabs copied to clipboard

Nav Scroll tabs breaks flex layouts

Open fernandobandeira opened this issue 5 years ago • 0 comments

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:

screen shot 2019-03-07 at 21 21 54

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.

screen shot 2019-03-07 at 21 22 45

Removing the width on .rc-tabs-nav-scroll fixes the issue:

screen shot 2019-03-07 at 21 23 50

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.

fernandobandeira avatar Mar 08 '19 00:03 fernandobandeira