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

Side by Side Diff: sky/examples/flights-app/app-search-input.sky

Issue 886683002: Add a selection and outline to flights-app. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « no previous file | sky/examples/flights-app/app-toast.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 <import src="../../framework/sky-element/sky-element.sky" as="SkyElement" /> 1 <import src="../../framework/sky-element/sky-element.sky" as="SkyElement" />
2 2
3 <sky-element name="app-search-input"> 3 <sky-element name="app-search-input">
4 <template> 4 <template>
5 <style> 5 <style>
6 :host { 6 :host {
7 background-color: #F6F6F6; 7 background-color: #F6F6F6;
8 padding: 4px; 8 padding: 4px;
9 display: flex; 9 display: flex;
10 align-items: center; 10 align-items: center;
11 font-size: 1.2em; 11 font-size: 1.2em;
12 } 12 }
13 13
14 .input-text { 14 .input-text {
15 margin-left: 8px; 15 margin-left: 8px;
16 } 16 }
17 </style> 17 </style>
18 <span class="input-icon"> 18 <span class="input-icon">
19 <img src="/sky/examples/flights/images/magnifying-glass.png" style="width: 1 6px"> 19 <img src="/sky/examples/flights/images/magnifying-glass.png" style="width: 1 6px">
20 </span> 20 </span>
21 <span class="input-text"><t>flights today to dc by price</t></span> 21 <span class="input-text"><t>flights today to dc by price</t></span>
22 </template> 22 </template>
23 <script> 23 <script>
24 module.exports = class extends SkyElement { 24 module.exports = class extends SkyElement {
25 attached() {
26 var sel = window.getSelection();
27 var input = this.shadowRoot.querySelector('t');
28 sel.selectAllChildren(input);
29 }
25 }.register(); 30 }.register();
26 </script> 31 </script>
27 </sky-element> 32 </sky-element>
OLDNEW
« no previous file with comments | « no previous file | sky/examples/flights-app/app-toast.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698