Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit e2c50a8

Browse files
enhance(tabs): refactored ink-bar animation to user a smoother method
1 parent 3750bff commit e2c50a8

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

src/components/tabs/_tabs.scss

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,8 @@ md-tabs-ink-bar {
9999
transform: scaleX(1);
100100
transition: transform 0.5s $swift-ease-in-out-timing-function;
101101
transform-origin: 0 0;
102-
md-tabs-ink-bar-inner {
103-
transition: transform 0.25s $swift-ease-out-timing-function;
104-
transform: scaleX(1);
105-
transform-origin: 50% 50%;
106-
position: absolute;
107-
top: 0;
108-
left: 0;
109-
right: 0;
110-
bottom: 0;
111-
}
112-
&.md-ink-bar-grow {
113-
md-tabs-ink-bar-inner {
114-
transition: transform 0.25s $swift-ease-in-timing-function;
115-
transform: scaleX(1.35);
116-
}
102+
&.md-ink-bar-delayed {
103+
transition: transform 0.5s cubic-bezier(0.45, 0, 0.15, 1);
117104
}
118105
}
119106

src/components/tabs/js/inkBarDirective.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function MdTabInkDirective($mdConstant, $window, $$rAF, $timeout) {
1414
return {
1515
restrict: 'E',
1616
require: ['^?mdNoBar', '^mdTabs'],
17-
template: '<md-tabs-ink-bar-inner></md-tabs-ink-bar-inner>',
1817
link: postLink
1918
};
2019

src/components/tabs/js/tabsDirective.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ function TabsDirective($parse, $mdTheming) {
100100
// flex container for <md-tab> elements
101101
'<div class="md-header-items">' +
102102
'<md-tabs-ink-bar></md-tabs-ink-bar>' +
103+
'<md-tabs-ink-bar class="md-ink-bar-delayed"></md-tabs-ink-bar>' +
103104
'</div>' +
104105
'</div>' +
105106

src/components/tabs/tabs-theme.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ md-tabs.md-#{$theme-name}-theme {
1313

1414
md-tabs-ink-bar {
1515
color: $tabs-highlight-color;
16-
md-tabs-ink-bar-inner {
17-
background: $tabs-highlight-color;
18-
}
16+
background: $tabs-highlight-color;
1917
}
2018

2119
md-tab {

0 commit comments

Comments
 (0)