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

Commit a8ff2ad

Browse files
author
Robert Messerle
committed
fix(tabs): replaces pagination transition with transform rather than left for performance
Related to #2821
1 parent 668fbe2 commit a8ff2ad

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

docs/app/css/style.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,6 @@ ul.methods > li:first-child > *:first-child {
750750
.version-picker {
751751
background: #5262BC !important;
752752
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
753-
z-index: 3;
754-
position: relative;
755753
}
756754
.version-picker .menu-toggle-list {
757755
background: transparent !important;

docs/config/template/index.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
md-component-id="left"
1818
md-is-locked-open="$mdMedia('gt-sm')">
1919

20-
<header class="nav-header md-whiteframe-glow-z1">
20+
<header class="nav-header">
2121
<a ng-href="#/" class="docs-logo">
2222
<img src="img/icons/angular-logo.svg"/>
2323
<h1 class="docs-logotype md-heading">Angular Material</h1>

src/components/tabs/js/tabsController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function MdTabsController ($scope, $element, $window, $timeout, $mdConstant, $md
119119

120120
function handleOffsetChange (left) {
121121
var newValue = shouldCenterTabs() ? '' : '-' + left + 'px';
122-
angular.element(elements.paging).css('left', newValue);
122+
angular.element(elements.paging).css('transform', 'translate3d(' + newValue + ', 0, 0)');
123123
$scope.$broadcast('$mdTabsPaginationChanged');
124124
}
125125

src/components/tabs/tabs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ md-pagination-wrapper {
142142
@include pie-clearfix;
143143
height: $tabs-header-height;
144144
display: block;
145-
transition: left $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
145+
transition: transform $swift-ease-in-out-duration $swift-ease-in-out-timing-function;
146146
position: absolute;
147147
width: 999999px;
148148
left: 0;

0 commit comments

Comments
 (0)