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

Side by Side Diff: third_party/polymer/v0_8/components-chromium/paper-scroll-header-panel/README.md

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 paper-scroll-header-panel
2 ========================
3
4 `paper-scroll-header-panel` contains a header section and a content section. The header is initially on the top part of the view but it scrolls away with the re st of the scrollable content. Upon scrolling slightly up at any point, the heade r scrolls back into view. This saves screen space and allows users to access imp ortant controls by easily moving them back to the view.
5
6 Important: The `paper-scroll-header-panel` will not display if its parent does n ot have a height. Using layout classes, you can easily make the `paper-scroll-he ader-panel` fill the screen
7
8 ```html
9 <body class="fullbleed layout vertical">
10 <paper-scroll-header-panel class="flex">
11 <paper-toolbar>
12 Hello World!
13 </paper-toolbar>
14 </paper-scroll-header-panel>
15 </body>
16 ```
17 or, if you would prefer to do it in CSS, just give html, body, and `paper-scroll -header-panel` a height of 100%:
18 ```css
19 html, body {
20 height: 100%;
21 margin: 0;
22 }
23 paper-scroll-header-panel {
24 height: 100%;
25 }
26 ```
27 `paper-scroll-header-panel` works well with `paper-toolbar` but can use any elem ent that represents a header by adding a core-header class to it.
28
29 ```html
30 <paper-scroll-header-panel>
31 <paper-toolbar>Header</paper-toolbar>
32 <div>Content goes here...</div>
33 </paper-scroll-header-panel>
34 ```
35
36 ### Styling scroll-header-panel:
37
38 To change background for toolbar when it is at its full size:
39
40 ```css
41 paper-scroll-header-panel {
42 --paper-scroll-header-panel-full-header: {
43 background-color: red;
44 };
45 }
46 ```
47
48 To change the background for toolbar when it is condensed:
49
50 ```css
51 paper-scroll-header-panel {
52 --paper-scroll-header-panel-condensed-header: {
53 background-color: #f4b400;
54 };
55 }
56 ```
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698