OLD | NEW |
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-element.sky" /> | 6 <import src="sky-element.sky" /> |
7 <import src="material-element.sky" /> | 7 <import src="material-element.sky" /> |
8 <import src="sky-icon.sky" /> | 8 <import src="sky-icon.sky" /> |
9 | 9 |
10 <sky-element attributes="icon:string"> | 10 <sky-element attributes="icon:string"> |
11 <template> | 11 <template> |
12 <style> | 12 <style> |
13 :host { | 13 :host { |
14 display: flex; | 14 display: flex; |
| 15 flex-direction: row; |
15 align-items: center; | 16 align-items: center; |
16 height: 48px; | 17 height: 48px; |
17 -webkit-user-select: none; | 18 -webkit-user-select: none; |
18 } | 19 } |
19 #background { | 20 #background { |
20 display: flex; | 21 display: flex; |
| 22 flex-direction: row; |
21 align-items: center; | 23 align-items: center; |
22 height: 100%; | 24 height: 100%; |
23 flex: 1; | 25 flex: 1; |
24 } | 26 } |
25 #background[highlight] { | 27 #background[highlight] { |
26 background: rgba(153, 153, 153, 0.4); | 28 background: rgba(153, 153, 153, 0.4); |
27 } | 29 } |
28 sky-icon { | 30 sky-icon { |
29 padding: 0px 16px; | 31 padding: 0px 16px; |
30 } | 32 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 73 } |
72 | 74 |
73 void _handlePointerUp(Event event) { | 75 void _handlePointerUp(Event event) { |
74 shadowRoot.getElementById('background').removeAttribute('highlight'); | 76 shadowRoot.getElementById('background').removeAttribute('highlight'); |
75 } | 77 } |
76 } | 78 } |
77 | 79 |
78 _init(script) => register(script, SkyMenuItem); | 80 _init(script) => register(script, SkyMenuItem); |
79 </script> | 81 </script> |
80 </sky-element> | 82 </sky-element> |
OLD | NEW |