Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/@adobe/spectrum-css-temp/components/tabs/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ governing permissions and limitations under the License.

/* Be below the tab */
z-index: 0;

transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;
transform-origin: top left;


Expand Down Expand Up @@ -169,6 +167,7 @@ governing permissions and limitations under the License.
block-size: var(--spectrum-tabs-rule-height);

inset-block-end: calc(var(--spectrum-tabs-rule-height) * -1);
transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out, width var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still a bit iffy (the line will still show some weird transition behavior w/ regards to sizing), can be solved by increasing the animation duration (300 ms works pretty nice). Loath to change it since it has a var tied to it though

}

&.spectrum-Tabs--isCollapsed {
Expand Down Expand Up @@ -254,6 +253,7 @@ governing permissions and limitations under the License.
inline-size: var(--spectrum-tabs-vertical-rule-width);

inset-inline-start: calc(var(--spectrum-tabs-vertical-rule-width) * -1);
transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out, height var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;
}
}

Expand All @@ -271,4 +271,4 @@ governing permissions and limitations under the License.

.spectrum-TabsPanel-tabpanel {
flex-grow: 1;
}
}
19 changes: 19 additions & 0 deletions packages/@react-spectrum/tabs/stories/Tabs.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,25 @@ storiesOf('Tabs', module)
</Tabs>
</Flex>
)
)
.add(
'transition between tab sizes',
() => (
(
<Tabs maxWidth={500}>
<Item title="Tab 1 long long long name">
<Content margin="size-160">
<Text>Text</Text>
</Content>
</Item>
<Item title="Tab 2">
<Content margin="size-160">
<Text>Text 2</Text>
</Content>
</Item>
</Tabs>
)
)
);

function render(props = {}) {
Expand Down