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

Side by Side Diff: sky/examples/example-scaffold.sky

Issue 887793002: Implement PointerEvent#dx (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Another nit Created 5 years, 10 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
« no previous file with comments | « sky/examples/appish.sky ('k') | sky/framework/sky-drawer.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="/sky/framework/sky-drawer.sky" /> 6 <import src="/sky/framework/sky-drawer.sky" />
7 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> 7 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
8 <import src="/sky/framework/sky-scrollable.sky" /> 8 <import src="/sky/framework/sky-scrollable.sky" />
9 9
10 <sky-element name="example-scaffold"> 10 <sky-element name="example-scaffold">
11 <template> 11 <template>
12 <style> 12 <style>
13 :host { 13 :host {
14 display: flex; 14 display: flex;
15 flex-direction: column; 15 flex-direction: column;
16 height: -webkit-fill-available; 16 height: -webkit-fill-available;
17 } 17 }
18 sky-drawer { 18 sky-drawer {
19 position: absolute; 19 position: absolute;
20 z-index: 1; 20 z-index: 2;
21 top: 0; 21 top: 0;
22 left: 0; 22 left: 0;
23 bottom: 0; 23 bottom: 0;
24 right: 0; 24 right: 0;
25 } 25 }
26 sky-toolbar { 26 sky-toolbar {
27 position: relative;
28 z-index: 1;
27 display: flex; 29 display: flex;
28 align-items: center; 30 align-items: center;
29 background-color: #526E9C; 31 background-color: #607D8A;
30 color: white; 32 color: white;
31 height: 56px; 33 height: 56px;
34 box-shadow: 0px 2px 4px gray;
32 } 35 }
33 #menu { 36 #menu {
34 display: flex; 37 display: flex;
35 justify-content: center; 38 justify-content: center;
36 align-items: center; 39 align-items: center;
37 width: 24px; 40 width: 24px;
38 height: 24px; 41 height: 24px;
39 padding: 7px; 42 padding: 7px;
40 margin: 0 8px; 43 margin: 0 8px;
41 background-color: papayawhip; 44 background-color: papayawhip;
42 color: black; 45 color: black;
43 } 46 }
44 #title { 47 #title {
45 flex: 1; 48 flex: 1;
46 margin: 0 8px; 49 margin: 0 8px;
47 } 50 }
48 sky-scrollable { 51 sky-scrollable {
49 flex: 1; 52 flex: 1;
50 background-color: green; 53 background-color: #E7E7E7;
51 } 54 }
52 </style> 55 </style>
53 <sky-drawer id="drawer"> 56 <sky-drawer id="drawer">
54 <content select=".menu"/> 57 <content select=".menu"/>
55 </sky-drawer> 58 </sky-drawer>
56 <sky-toolbar> 59 <sky-toolbar>
57 <div id="menu" on-click="handleMenuClick"/> 60 <div id="menu" on-click="handleMenuClick"/>
58 <content id="title" select=".title"/> 61 <content id="title" select=".title"/>
59 </sky-toolbar> 62 </sky-toolbar>
60 <sky-scrollable> 63 <sky-scrollable>
61 <content /> 64 <content />
62 </sky-scrollable> 65 </sky-scrollable>
63 </template> 66 </template>
64 <script> 67 <script>
65 module.exports = class extends SkyElement { 68 module.exports = class extends SkyElement {
66 created() { 69 created() {
67 this.toolbar_ = null; 70 this.toolbar_ = null;
68 } 71 }
69 72
70 shadowRootReady() { 73 shadowRootReady() {
71 this.toolbar_ = this.shadowRoot.getElementById('drawer'); 74 this.toolbar_ = this.shadowRoot.getElementById('drawer');
72 } 75 }
73 76
74 handleMenuClick() { 77 handleMenuClick() {
75 this.toolbar_.toggle(); 78 this.toolbar_.toggle();
76 } 79 }
77 }.register(); 80 }.register();
78 </script> 81 </script>
79 </sky-element> 82 </sky-element>
OLDNEW
« no previous file with comments | « sky/examples/appish.sky ('k') | sky/framework/sky-drawer.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698