Hi !
I’m in trouble with nestable tabs ! I added it and I set tab menu and tab content in horizontal direction. Then, because my tab content is long, I wanted to make the tab menu always visible with sticky position and that doesn’t work.
Ps : If I set the direction to vertical, stick position works fine.
I’ll mark this topic as a no-bug, because this is just how CSS works.
When you align Tabs (Nestable) horizontally, and I suppose in Tab Menu, you set it to Vertical and position sticky, you will also need to set align-self to flex-start (Start), then it should work.
Explanation: Since adding flex to the wrapper, the child elements default to stretch, which means that all elements are the same height, and you can’t scroll elements if they are the same height.
By settings “flex-start” property, will set the height to “auto”, and scrolling will be allowed.
As usual, your advices are really helpful and solve issues ! Thanks !
It brings an other question : Is there an easy solution to scroll to the top of the content tab when clicking on the title tab ? It could be useful if the content is long.
There is no easy way to do this, but you can use the JS below to do that, you just need to run it after DOM is parsed.
The function below finds all .tab-titleand then add a click listener on it, so that it scrolls to top (smoothly).
Maybe you will need to adapt it a little, this is just a quick demo