2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10 <link href=
"core-transition-pages.html" rel=
"import">
12 <core-style id=
"cascade-transition">
13 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div'; }
14 :host(.cascade) ::content
> * /deep/ [cascade]
> div {
15 -webkit-transition: -webkit-transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(
0.4,
0,
0.2,
1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(
0.4,
0,
0.2,
1);
16 transition: transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(
0.4,
0,
0.2,
1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(
0.4,
0,
0.2,
1);
19 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
2)'; }
20 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
2) {
21 -webkit-transition-delay:
0.05s;
22 transition-delay:
0.05s;
25 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
3)'; }
26 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
3) {
27 -webkit-transition-delay:
0.1s;
28 transition-delay:
0.1s;
31 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
4)'; }
32 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
4) {
33 -webkit-transition-delay:
0.15s;
34 transition-delay:
0.15s;
37 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
5)'; }
38 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
5) {
39 -webkit-transition-delay:
0.2s;
40 transition-delay:
0.2s;
43 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
6)'; }
44 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
6) {
45 -webkit-transition-delay:
0.25s;
46 transition-delay:
0.25s;
49 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
7)'; }
50 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
7) {
51 -webkit-transition-delay:
0.3s;
52 transition-delay:
0.3s;
55 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
8)'; }
56 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
8) {
57 -webkit-transition-delay:
0.35s;
58 transition-delay:
0.35s;
61 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
9)'; }
62 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
9) {
63 -webkit-transition-delay:
0.4s;
64 transition-delay:
0.4s;
67 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
10)'; }
68 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
10) {
69 -webkit-transition-delay:
0.45s;
70 transition-delay:
0.45s;
73 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
11)'; }
74 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
11) {
75 -webkit-transition-delay:
0.5s;
76 transition-delay:
0.5s;
79 polyfill-next-selector { content: ':host(.cascade)
> * [cascade]
> div:nth-of-type(
12)'; }
80 :host(.cascade) ::content
> * /deep/ [cascade]
> div:nth-of-type(
12) {
81 -webkit-transition-delay:
0.55s;
82 transition-delay:
0.55s;
85 polyfill-next-selector { content: '.core-selected [cascade]
> div'; }
86 ::content
> .core-selected /deep/ [cascade]
> div {
89 polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade]
> div'; }
90 ::content
> [animate]:not(.core-selected) /deep/ [cascade]
> div {
91 -webkit-transform: translateY(
100%);
92 transform: translateY(
100%);
95 polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade][fade]
> div'; }
96 ::content
> [animate]:not(.core-selected) /deep/ [cascade][fade]
> div {
103 `cascade-transition` slides the children of a container up in sequence, creating a
104 reverse waterfall effect. It works well with both grids and lists. Configure the
105 duration of the transition with the global variable `CoreStyle.g.transitions.cascadeDuration`.
109 <core-animated-pages transition="cascade-transition">
111 <div id="container" cascade>
122 </core-animated-pages>
124 In the above example, the immediate children of `#container` will slide up in
125 sequence when the page transitions from 0 to 1.
127 The items can optionally fade in as they slide. Add the `fade` attribute to
128 the container to do that and configure the duration of the opacity transition with
129 the global variable `CoreStyle.g.transitions.cascadeFadeDuration`.
131 @class cascade-transition
132 @extends core-transition-pages
138 <core-transition-pages id=
"cascade-transition" activeClass=
"cascade" transitionProperty=
"transform"></core-transition-pages>