Enabling horizontal flex in tab content containers

Hi there. I’m trying to figure out the new tab system in 6.0.

I’m trying to get the elements under a tab content container to align horizontally in a row instead of the default vertical. The unity-tab_content-container children under the Tab elements are themselves greyed out, so I cannot edit the flex direction to be horizontal. I have tried overriding with a .uss sheet:

.unity-tab_content-container {
    flex-direction: row; /* Ensures horizontal layout */
}

But this does not seem to affect the unity-tab_content-container. I have also tried setting the flex direction to horizontal on the Tab element itself, but that doesn’t affect children further down the hierarchy.

Is there a way to set the flex direction to horizontal for the greyed-out unity-tab_content-container elements?

You’re missing an underscore.

It’s .unity-tab__content-container

The names for notable elements in built in controls are in the docs: Unity - Manual: TabView

1 Like

Oh my goodness. I guess the missed semi-colon of .uss XD. Thank you!

1 Like