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

Side by Side Diff: chrome/browser/resources/settings/controls/dialog_drawer.html

Issue 2465433002: Create implementation of the side panel using a dialog. (Closed)
Patch Set: feedback Created 4 years 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 <link rel="import" href="chrome://resources/html/polymer.html">
2
3 <dom-module name="dialog-drawer">
4 <template>
5 <style>
6 :host {
7 --drawer-width: 256px;
8 background-color: #FFF;
9 border: none;
10 bottom: 0;
11 left: calc(-1 * var(--drawer-width));
12 margin: 0;
13 overflow: hidden;
14 padding: 0;
15 position: absolute;
16 top: 0;
17 transition: left 200ms ease;
dpapad 2016/12/09 18:57:53 Nit: perhaps you could also add one more variable,
hcarmona 2016/12/09 19:21:26 Done.
18 width: var(--drawer-width);
19 }
20
21 :host,
22 #container {
23 height: 100%;
24 }
25
26 :host(.opening) {
27 left: 0;
28 }
29
30 :host([align=right]) {
31 left: auto;
32 right: calc(-1 * var(--drawer-width));
33 transition: right 200ms ease;
34 }
35
36 :host(.opening[align=right]) {
37 right: 0;
38 }
39
40 :host::backdrop {
41 background: rgba(0, 0, 0, 0.5);
42 bottom: 0;
43 left: 0;
44 opacity: 0;
45 position: absolute;
46 right: 0;
47 top: 0;
48 transition: opacity 200ms ease;
49 }
50
51 :host(.opening)::backdrop {
52 opacity: 1;
53 }
54 </style>
55 <div id="container" on-tap="onContainerTap_">
56 <content></content>
57 </div>
58 </template>
59 </dom-module>
60 <script src="dialog_drawer.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698