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

Unified Diff: third_party/polymer/v1_0/components-chromium/app-layout/app-header-layout/app-header-layout.html

Issue 1984963002: Roll Polymer elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/v1_0/components-chromium/app-layout/app-header-layout/app-header-layout.html
diff --git a/third_party/polymer/v1_0/components-chromium/app-layout/app-header-layout/app-header-layout.html b/third_party/polymer/v1_0/components-chromium/app-layout/app-header-layout/app-header-layout.html
new file mode 100644
index 0000000000000000000000000000000000000000..2060b9dc5b2981aebd91861b80b93b5e2a38c96b
--- /dev/null
+++ b/third_party/polymer/v1_0/components-chromium/app-layout/app-header-layout/app-header-layout.html
@@ -0,0 +1,107 @@
+<!--
+@license
+Copyright (c) 2015 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
+--><html><head><link rel="import" href="../../polymer/polymer.html">
+<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
+<link rel="import" href="../../iron-resizable-behavior/iron-resizable-behavior.html">
+
+<!--
+app-header-layout is a wrapper element that positions an app-header and other content. This
+element uses the document scroll by default, but it can also define its own scrolling region.
+
+Using the document scroll:
+
+```html
+<app-header-layout>
+ <app-header fixed condenses effects="waterfall">
+ <app-toolbar>
+ <div title>App name</div>
+ </app-toolbar>
+ </app-header>
+ <div>
+ main content
+ </div>
+</app-header-layout>
+```
+
+Using an own scrolling region:
+
+```html
+<app-header-layout has-scrolling-region style="width: 300px; height: 400px;">
+ <app-header fixed condenses effects="waterfall">
+ <app-toolbar>
+ <div title>App name</div>
+ </app-toolbar>
+ </app-header>
+ <div>
+ main content
+ </div>
+</app-header-layout>
+```
+
+@group App Elements
+@element app-header-layout
+@demo app-header-layout/demo/simple.html Simple Demo
+@demo app-header-layout/demo/scrolling-region.html Scrolling Region
+@demo app-header-layout/demo/music.html Music Demo
+-->
+
+</head><body><dom-module id="app-header-layout">
+ <template>
+ <style>
+ :host {
+ display: block;
+
+ /**
+ * Force app-header-layout to have its own stacking context so that its parent can
+ * control the stacking of it relative to other elements (e.g. app-drawer-layout).
+ * This could be done using `isolation: isolate`, but that's not well supported
+ * across browsers.
+ */
+ position: relative;
+ z-index: 0;
+ }
+
+ :host([has-scrolling-region]) {
+ height: 100%;
+ }
+
+ :host > ::content > app-header {
+ @apply(--layout-fixed-top);
+
+ z-index: 1;
+ }
+
+ :host([has-scrolling-region]) > ::content > app-header {
+ position: absolute;
+ }
+
+ #contentContainer {
+ /* Create a stacking context here so that all children appear below the header. */
+ position: relative;
+ z-index: 0;
+ }
+
+ :host([has-scrolling-region]) > #contentContainer {
+ @apply(--layout-fit);
+
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+ </style>
+
+ <content id="header" select="app-header"></content>
+
+ <div id="contentContainer">
+ <content></content>
+ </div>
+
+ </template>
+
+ </dom-module>
+<script src="app-header-layout-extracted.js"></script></body></html>

Powered by Google App Engine
This is Rietveld 408576698