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

Commit

Permalink
fix(tabs): adds fix for css transition on theme change
Browse files Browse the repository at this point in the history
Closes #1033.
  • Loading branch information
Robert Messerle committed Jan 27, 2015
1 parent 572da37 commit 312dcc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/tabs/js/tabItemDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ function MdTabDirective($mdInkRipple, $compile, $mdUtil, $mdConstant, $timeout)
var tabItemCtrl = ctrls[0]; // Controller for THIS tabItemCtrl
var tabsCtrl = ctrls[1]; // Controller for ALL tabs

$timeout(element.addClass.bind(element, 'md-tab-themed'), 0, false);

scope.$watch(
function () { return attr.label; },
function () { $timeout(function () { tabsCtrl.scope.$broadcast('$mdTabsChanged'); }, 0, false); }
Expand Down
7 changes: 5 additions & 2 deletions src/components/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ md-tab {
cursor: pointer;
padding: 20px 24px;
box-sizing: border-box;
transition: background 0.35s $swift-ease-in-out-timing-function,
color 0.35s $swift-ease-in-out-timing-function;
transition: none;
&.md-tab-themed {
transition: background 0.35s $swift-ease-in-out-timing-function,
color 0.35s $swift-ease-in-out-timing-function;
}

&[disabled] {
pointer-events: none;
Expand Down

0 comments on commit 312dcc6

Please sign in to comment.