OLD | NEW |
1 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc
h_field_behavior.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc
h_field_behavior.html"> |
2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
3 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
6 | 7 |
7 <dom-module id="settings-subpage-search"> | 8 <dom-module id="settings-subpage-search"> |
8 <template> | 9 <template> |
9 <style> | 10 <style> |
| 11 :host { |
| 12 --paper-input-suffix: { |
| 13 /* Required to align the icon in |clearSearch| vertically. */ |
| 14 line-height: 0; |
| 15 } |
| 16 } |
| 17 |
| 18 paper-icon-button { |
| 19 /* A 16px icon that fits on the input line. */ |
| 20 height: 24px; |
| 21 padding: 4px; |
| 22 width: 24px; |
| 23 } |
| 24 |
10 paper-input-container { | 25 paper-input-container { |
11 display: inline-block; | 26 display: inline-block; |
12 width: var(--paper-input-max-width); | 27 width: 160px; /* Special width for search input. */ |
13 } | 28 } |
14 | 29 |
15 input[type='search']::-webkit-search-cancel-button { | 30 input[type='search']::-webkit-search-cancel-button { |
16 -webkit-appearance: none; | 31 -webkit-appearance: none; |
17 } | 32 } |
18 | 33 |
19 #prompt, | 34 #prompt, |
20 #searchInput { | 35 #searchInput { |
21 font-size: inherit; | 36 font-size: 92.3076923%; /* To 12px from 13px. */ |
22 line-height: 36px; | |
23 } | 37 } |
24 | 38 |
25 #prompt { | 39 #prompt { |
26 color: var(--google-grey-500); | 40 color: var(--paper-grey-600); |
27 } | 41 } |
28 | 42 |
29 #searchInput { | 43 #searchInput { |
30 color: var(--paper-grey-800); | 44 color: var(--paper-grey-800); |
31 } | 45 } |
32 | 46 |
33 #clearSearch { | 47 #clearSearch { |
34 -webkit-margin-end: -8px; | 48 -webkit-margin-end: -4px; |
35 -webkit-margin-start: 8px; | 49 -webkit-margin-start: 4px; |
36 } | |
37 | |
38 :root { | |
39 --paper-icon-button { | |
40 height: 36px; | |
41 width: 36px; | |
42 } | |
43 | |
44 --paper-input-suffix: { | |
45 /* Required to align the icon in |clearSearch| vertically. */ | |
46 line-height: 0; | |
47 } | |
48 } | 50 } |
49 </style> | 51 </style> |
50 <paper-icon-button id="searchIcon" icon="cr:search"></paper-icon-button> | 52 <paper-icon-button id="searchIcon" icon="cr:search"></paper-icon-button> |
51 <paper-input-container no-label-float on-search="onSearchTermSearch"> | 53 <paper-input-container no-label-float on-search="onSearchTermSearch"> |
52 <label id="prompt">[[label]]</label> | 54 <label id="prompt">[[label]]</label> |
53 <input is="iron-input" id="searchInput" type="search" | 55 <input is="iron-input" id="searchInput" type="search" |
54 aria-labelledby="prompt" incremental> | 56 aria-labelledby="prompt" incremental> |
55 </input> | 57 </input> |
56 <paper-icon-button suffix icon="cr:cancel" id="clearSearch" | 58 <paper-icon-button suffix icon="cr:cancel" id="clearSearch" |
57 on-tap="onTapClear_" title="[[clearLabel]]" hidden$="[[!lastValue_]]"> | 59 on-tap="onTapClear_" title="[[clearLabel]]" hidden$="[[!lastValue_]]"> |
58 </paper-icon-button> | 60 </paper-icon-button> |
59 </paper-input-container> | 61 </paper-input-container> |
60 </template> | 62 </template> |
61 <script src="settings_subpage_search.js"></script> | 63 <script src="settings_subpage_search.js"></script> |
62 </dom-module> | 64 </dom-module> |
OLD | NEW |