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

Commit

Permalink
fix(tabs): updates CSS so that tabs support scrolling when necessary
Browse files Browse the repository at this point in the history
Closes #2088
  • Loading branch information
Robert Messerle committed Apr 1, 2015
1 parent a33a128 commit 9f0d428
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/components/tabs/js/tabsDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
\'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null,\
\'md-active\': tab.isActive(),\
\'md-left\': tab.isLeft(),\
\'md-right\': tab.isRight()\
\'md-right\': tab.isRight(),\
\'md-no-scroll\': dynamicHeight\
}"></md-tab-content>\
</md-tabs-content-wrapper>\
',
Expand Down
14 changes: 6 additions & 8 deletions src/components/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ md-tabs {
border-radius: 2px;
overflow: hidden;
position: relative;
transition: height $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
&:not(.md-no-tab-content) {
min-height: 200 + $tabs-header-height;
}
Expand All @@ -37,14 +38,6 @@ md-tabs {
border-style: solid;
}
}
&[md-dynamic-height] {
transition: height $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
md-tabs-content-wrapper {
md-tab-content {
bottom: initial;
}
}
}
md-tabs-wrapper {
display: block;
position: relative;
Expand Down Expand Up @@ -189,6 +182,11 @@ md-tabs {
top: 0; left: 0; right: 0; bottom: 0;
transform: translateX(0);
transition: transform $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
overflow: auto;
&.md-no-scroll {
bottom: auto;
overflow: hidden;
}
&.ng-leave, &.md-no-transition {
transition: none;
}
Expand Down

0 comments on commit 9f0d428

Please sign in to comment.