| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 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.g
ithub.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/CONTRI
BUTORS.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/PATEN
TS.txt | |
| 8 --><!-- | |
| 9 `core-scroll-header-panel` contains a header section and a content section. The | |
| 10 header is initially on the top part of the view but it scrolls away with the | |
| 11 rest of the scrollable content. Upon scrolling slightly up at any point, the | |
| 12 header scrolls back into view. This saves screen space and allows users to | |
| 13 access important controls by easily moving them back to the view. | |
| 14 | |
| 15 __Important:__ The `core-scroll-header-panel` will not display if its parent doe
s not have a height. | |
| 16 | |
| 17 Using [layout attributes](http://www.polymer-project.org/docs/polymer/layout-att
rs.html), you can easily make the `core-scroll-header-panel` fill the screen | |
| 18 | |
| 19 <body fullbleed layout vertical> | |
| 20 <core-scroll-header-panel flex> | |
| 21 <core-toolbar> | |
| 22 <div>Hello World!</div> | |
| 23 </core-toolbar> | |
| 24 </core-scroll-header-panel> | |
| 25 </body> | |
| 26 | |
| 27 or, if you would prefer to do it in CSS, just give `html`, `body`, and `core-scr
oll-header-panel` a height of 100%: | |
| 28 | |
| 29 html, body { | |
| 30 height: 100%; | |
| 31 margin: 0; | |
| 32 } | |
| 33 core-scroll-header-panel { | |
| 34 height: 100%; | |
| 35 } | |
| 36 | |
| 37 `core-scroll-header-panel` works well with `core-toolbar` but can use any elemen
t | |
| 38 that represents a header by adding a `core-header` class to it. | |
| 39 | |
| 40 <core-scroll-header-panel> | |
| 41 <core-toolbar>Header</core-toolbar> | |
| 42 <div>Content goes here...</div> | |
| 43 </core-scroll-header-panel> | |
| 44 | |
| 45 @group Polymer Core Elements | |
| 46 @element core-scroll-header-panel | |
| 47 @homepage github.io | |
| 48 --><html><head><link rel="import" href="../polymer/polymer.html"> | |
| 49 <link rel="import" href="../core-resizable/core-resizable.html"> | |
| 50 | |
| 51 </head><body><polymer-element name="core-scroll-header-panel" assetpath=""> | |
| 52 <template> | |
| 53 | |
| 54 <link rel="stylesheet" href="core-scroll-header-panel.css"> | |
| 55 | |
| 56 <div id="mainContainer"> | |
| 57 | |
| 58 <content id="mainContent" select=":not(core-toolbar):not(.core-header)"></co
ntent> | |
| 59 | |
| 60 </div> | |
| 61 | |
| 62 <div id="headerContainer"> | |
| 63 | |
| 64 <div class="bg-container"> | |
| 65 <div id="condensedHeaderBg"></div> | |
| 66 <div id="headerBg"></div> | |
| 67 </div> | |
| 68 | |
| 69 <content id="headerContent" select="core-toolbar, .core-header"></content> | |
| 70 | |
| 71 </div> | |
| 72 | |
| 73 </template> | |
| 74 | |
| 75 </polymer-element> | |
| 76 <script charset="utf-8" src="core-scroll-header-panel-extracted.js"></script></b
ody></html> | |
| OLD | NEW |