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

Commit 9f0d428

Browse files
author
Robert Messerle
committed
fix(tabs): updates CSS so that tabs support scrolling when necessary
Closes #2088
1 parent a33a128 commit 9f0d428

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/components/tabs/js/tabsDirective.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@
175175
\'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null,\
176176
\'md-active\': tab.isActive(),\
177177
\'md-left\': tab.isLeft(),\
178-
\'md-right\': tab.isRight()\
178+
\'md-right\': tab.isRight(),\
179+
\'md-no-scroll\': dynamicHeight\
179180
}"></md-tab-content>\
180181
</md-tabs-content-wrapper>\
181182
',

src/components/tabs/tabs.scss

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ md-tabs {
1717
border-radius: 2px;
1818
overflow: hidden;
1919
position: relative;
20+
transition: height $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
2021
&:not(.md-no-tab-content) {
2122
min-height: 200 + $tabs-header-height;
2223
}
@@ -37,14 +38,6 @@ md-tabs {
3738
border-style: solid;
3839
}
3940
}
40-
&[md-dynamic-height] {
41-
transition: height $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
42-
md-tabs-content-wrapper {
43-
md-tab-content {
44-
bottom: initial;
45-
}
46-
}
47-
}
4841
md-tabs-wrapper {
4942
display: block;
5043
position: relative;
@@ -189,6 +182,11 @@ md-tabs {
189182
top: 0; left: 0; right: 0; bottom: 0;
190183
transform: translateX(0);
191184
transition: transform $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
185+
overflow: auto;
186+
&.md-no-scroll {
187+
bottom: auto;
188+
overflow: hidden;
189+
}
192190
&.ng-leave, &.md-no-transition {
193191
transition: none;
194192
}

0 commit comments

Comments
 (0)