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

Commit

Permalink
add slide-from-bottom transition
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jun 27, 2014
1 parent 376a548 commit 1faae30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
31 changes: 31 additions & 0 deletions transitions/slide-from-bottom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link href="core-transition-pages.html" rel="import">

<core-style id="slide-from-bottom">
:host(.slide-from-bottom) ::content > * {
-webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
}

:host(.slide-from-bottom) ::content > .core-selected ~ [animate]:not(.core-selected) {
-webkit-transform: translateY(100%);
}

:host(.slide-from-bottom) ::content > [animate]:not(.core-selected) {
-webkit-transform: translateY(-100%);
}

:host(.slide-from-bottom) ::content > .core-selected {
-webkit-transform: none;
}
</core-style>

<core-transition-pages id="slide-from-bottom" scopeClass="slide-from-bottom"></core-transition-pages>
1 change: 0 additions & 1 deletion transitions/slide-from-right.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
-webkit-transform: translateX(-100%);
}

polyfill-next-selector { content: ':host > .core-selected'; }
:host(.slide-from-right) ::content > .core-selected {
-webkit-transform: none;
}
Expand Down

0 comments on commit 1faae30

Please sign in to comment.