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

Commit 6019718

Browse files
author
Robert Messerle
committed
fix(tabs): fixes CSS to respect non-truthy values for md-dynamic-height
Closes #3184
1 parent 2552686 commit 6019718

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/components/tabs/js/tabsController.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ function MdTabsController ($scope, $element, $window, $timeout, $mdConstant, $md
8585
$mdUtil.initOptionalProperties($scope, $attrs);
8686
$attrs.$observe('mdNoBar', function (value) { $scope.noInkBar = angular.isDefined(value); });
8787
$scope.$watch('selectedIndex', handleSelectedIndexChange);
88+
$scope.$watch('dynamicHeight', function (value) {
89+
if (value) $element.addClass('md-dynamic-height');
90+
else $element.removeClass('md-dynamic-height');
91+
});
8892
$scope.$on('$destroy', cleanup);
8993
}
9094

src/components/tabs/tabs.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ md-tabs {
2727
&.ng-animate {
2828
transition: height $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
2929
}
30-
&:not(.md-no-tab-content):not([md-dynamic-height]) {
30+
&:not(.md-no-tab-content):not(.md-dynamic-height) {
3131
min-height: 200 + $tabs-header-height;
3232
}
3333
&[md-align-tabs="bottom"] {
@@ -43,7 +43,7 @@ md-tabs {
4343
bottom: $tabs-header-height;
4444
}
4545
}
46-
&[md-dynamic-height] {
46+
&.md-dynamic-height {
4747
md-tabs-content-wrapper {
4848
min-height: 0;
4949
position: relative;
@@ -64,7 +64,7 @@ md-tabs {
6464
padding-bottom: 11px;
6565
}
6666
}
67-
&:not([md-dynamic-height]) {
67+
&:not(.md-dynamic-height) {
6868
md-tabs-content-wrapper {
6969
top: $tabs-header-height + 1;
7070
}

0 commit comments

Comments
 (0)