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

Side by Side Diff: third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.html

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 5 years, 5 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 <!--
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-drawer-panel` contains a drawer panel and a main panel. The drawer
10 and the main panel are side-by-side with drawer on the left. When the browser
11 window size is smaller than the `responsiveWidth`, `core-drawer-panel`
12 changes to narrow layout. In narrow layout, the drawer will be stacked on top
13 of the main panel. The drawer will slide in/out to hide/reveal the main
14 panel.
15
16 Use the attribute `drawer` to indicate that the element is the drawer panel and
17 `main` to indicate that the element is the main panel.
18
19 Example:
20
21 <core-drawer-panel>
22 <div drawer> Drawer panel... </div>
23 <div main> Main panel... </div>
24 </core-drawer-panel>
25
26 The drawer and the main panels are not scrollable. You can set CSS overflow
27 property on the elements to make them scrollable or use `core-header-panel`.
28
29 Example:
30
31 <core-drawer-panel>
32 <core-header-panel drawer>
33 <core-toolbar></core-toolbar>
34 <div> Drawer content... </div>
35 </core-header-panel>
36 <core-header-panel main>
37 <core-toolbar></core-toolbar>
38 <div> Main content... </div>
39 </core-header-panel>
40 </core-drawer-panel>
41
42 An element that should toggle the drawer will automatically do so if it's
43 given the `core-drawer-toggle` attribute. Also this element will automatically
44 be hidden in wide layout.
45
46 Example:
47
48 <core-drawer-panel>
49 <core-header-panel drawer>
50 <core-toolbar>
51 <div>Application</div>
52 </core-toolbar>
53 <div> Drawer content... </div>
54 </core-header-panel>
55 <core-header-panel main>
56 <core-toolbar>
57 <core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
58 <div>Title</div>
59 </core-toolbar>
60 <div> Main content... </div>
61 </core-header-panel>
62 </core-drawer-panel>
63
64 To position the drawer to the right, add `rightDrawer` attribute.
65
66 <core-drawer-panel rightDrawer>
67 <div drawer> Drawer panel... </div>
68 <div main> Main panel... </div>
69 </core-drawer-panel>
70
71 @group Polymer Core Elements
72 @element core-drawer-panel
73 @homepage github.io
74 --><html><head><link rel="import" href="../core-media-query/core-media-query.htm l">
75 <link rel="import" href="../core-selector/core-selector.html">
76
77 </head><body><polymer-element name="core-drawer-panel" touch-action="auto" asset path="">
78 <template>
79
80 <link rel="stylesheet" href="core-drawer-panel.css">
81
82 <core-media-query query="max-width: {{forceNarrow ? '' : responsiveWidth}}" qu erymatches="{{queryMatches}}"></core-media-query>
83
84 <core-selector class="{{ {'narrow-layout' : narrow, transition : transition, d ragging : dragging, 'right-drawer': rightDrawer} | tokenList }}" valueattr="id" selected="{{selected}}">
85
86 <div id="main" _style="left: {{ narrow || rightDrawer ? '0' : drawerWidth }} ; right: {{ rightDrawer ? (narrow ? '' : drawerWidth) : '' }};">
87 <content select="[main]"></content>
88 <div id="scrim" on-tap="{{togglePanel}}"></div>
89 </div>
90
91 <div id="drawer" _style="width: {{ drawerWidth }}">
92 <content select="[drawer]"></content>
93 </div>
94
95 </core-selector>
96
97 </template>
98
99 </polymer-element>
100 <script charset="utf-8" src="core-drawer-panel-extracted.js"></script></body></h tml>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698