Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #429 from benknight/master
Browse files Browse the repository at this point in the history
Rendering performance optimizations, promote-layer mixin
  • Loading branch information
cshold committed Sep 16, 2015
2 parents d837f5a + 8a8cc61 commit d75393f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions assets/timber.scss.liquid
Expand Up @@ -243,6 +243,14 @@ $socialIconFontStack: 'icons';
}
}

/*============================================================================
Layer promotion mixin for creating smoother animations with higher FPS.
==============================================================================*/
@mixin promote-layer($properties: transform) {
-webkit-transform: translateZ(0); // translateZ hack
will-change: $properties; // spec
}

/*============================================================================
Dependency-free breakpoint mixin
- Based on http://blog.grayghostvisuals.com/sass/sass-media-query-mixin/
Expand Down Expand Up @@ -2046,9 +2054,11 @@ label.error {
==============================================================================*/
.js-drawer-open {
overflow: hidden;
height: 100%;
}

.drawer {
@include promote-layer();
display: none;
position: fixed;
overflow-y: auto;
Expand Down Expand Up @@ -2113,6 +2123,7 @@ label.error {
}

.is-moved-by-drawer {
@include promote-layer();
transition: $drawerTransition;

.js-drawer-open-left & {
Expand Down

0 comments on commit d75393f

Please sign in to comment.