Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html

Issue 592593002: Inline scripts were extracted from Polymer elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/echo ""/echo/ Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html
diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html
new file mode 100644
index 0000000000000000000000000000000000000000..ed3e25b71f550d3ddf462281df6d0463d898fdcf
--- /dev/null
+++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html
@@ -0,0 +1,138 @@
+<!--
+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="cascade-transition">
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div {
+ -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);
+ 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);
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(2)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(2) {
+ -webkit-transition-delay: 0.05s;
+ transition-delay: 0.05s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(3)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(3) {
+ -webkit-transition-delay: 0.1s;
+ transition-delay: 0.1s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(4)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(4) {
+ -webkit-transition-delay: 0.15s;
+ transition-delay: 0.15s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(5)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(5) {
+ -webkit-transition-delay: 0.2s;
+ transition-delay: 0.2s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(6)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(6) {
+ -webkit-transition-delay: 0.25s;
+ transition-delay: 0.25s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(7)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(7) {
+ -webkit-transition-delay: 0.3s;
+ transition-delay: 0.3s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(8)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(8) {
+ -webkit-transition-delay: 0.35s;
+ transition-delay: 0.35s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(9)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(9) {
+ -webkit-transition-delay: 0.4s;
+ transition-delay: 0.4s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(10)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(10) {
+ -webkit-transition-delay: 0.45s;
+ transition-delay: 0.45s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(11)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(11) {
+ -webkit-transition-delay: 0.5s;
+ transition-delay: 0.5s;
+ }
+
+ polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(12)'; }
+ :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(12) {
+ -webkit-transition-delay: 0.55s;
+ transition-delay: 0.55s;
+ }
+
+ polyfill-next-selector { content: '.core-selected [cascade] > div'; }
+ ::content > .core-selected /deep/ [cascade] > div {
+ }
+
+ polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade] > div'; }
+ ::content > [animate]:not(.core-selected) /deep/ [cascade] > div {
+ -webkit-transform: translateY(100%);
+ transform: translateY(100%);
+ }
+
+ polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade][fade] > div'; }
+ ::content > [animate]:not(.core-selected) /deep/ [cascade][fade] > div {
+ opacity: 0;
+ }
+</core-style>
+
+<!--
+
+`cascade-transition` slides the children of a container up in sequence, creating a
+reverse waterfall effect. It works well with both grids and lists. Configure the
+duration of the transition with the global variable `CoreStyle.g.transitions.cascadeDuration`.
+
+Example:
+
+ <core-animated-pages transition="cascade-transition">
+ <section>
+ <div id="container" cascade>
+ <div>item 1</div>
+ <div>item 2</div>
+ <div>item 3</div>
+ <div>item 4</div>
+ <div>item 5</div>
+ <div>item 6</div>
+ <div>item 7</div>
+ </div>
+ </section>
+ <section></section>
+ </core-animated-pages>
+
+In the above example, the immediate children of `#container` will slide up in
+sequence when the page transitions from 0 to 1.
+
+The items can optionally fade in as they slide. Add the `fade` attribute to
+the container to do that and configure the duration of the opacity transition with
+the global variable `CoreStyle.g.transitions.cascadeFadeDuration`.
+
+@class cascade-transition
+@extends core-transition-pages
+@status beta
+@homepage github.io
+
+-->
+
+<core-transition-pages id="cascade-transition" activeClass="cascade" transitionProperty="transform"></core-transition-pages>

Powered by Google App Engine
This is Rietveld 408576698