|
28 | 28 | // ----------------------------------------- |
29 | 29 |
|
30 | 30 | .searchbar-search-icon { |
31 | | - width: globals.$ion-scale-400; |
32 | | - height: globals.$ion-scale-400; |
| 31 | + width: globals.$ion-scale-500; |
| 32 | + height: globals.$ion-scale-500; |
33 | 33 | } |
34 | 34 |
|
35 | 35 | // Searchbar Input Field |
|
72 | 72 | .searchbar-cancel-button { |
73 | 73 | background-color: transparent; |
74 | 74 |
|
75 | | - font-size: globals.$ion-font-size-400; |
76 | | -} |
77 | | - |
78 | | -// Searchbar Cancel Icon in Toolbar |
79 | | -// ----------------------------------------- |
80 | | - |
81 | | -:host-context(ion-toolbar).searchbar-should-show-cancel .searchbar-cancel-button { |
82 | | - /** |
83 | | - * The left edge of the cancel button |
84 | | - * should align with the left edge |
85 | | - * of the back button if the searchbar |
86 | | - * is used in a toolbar regardless of |
87 | | - * the searchbar size. |
88 | | - */ |
89 | | - @include globals.position-horizontal(9px, null); |
| 75 | + font-size: globals.$ion-font-size-500; |
90 | 76 | } |
91 | 77 |
|
92 | 78 | // Searchbar Search & Clear Icon & Cancel Icon |
|
114 | 100 | opacity: 1; |
115 | 101 | } |
116 | 102 |
|
| 103 | +// Searchbar in Toolbar |
| 104 | +// ----------------------------------------- |
| 105 | + |
| 106 | +:host-context(ion-toolbar).searchbar-should-show-cancel .searchbar-cancel-button { |
| 107 | + /** |
| 108 | + * The left edge of the cancel button |
| 109 | + * should align with the left edge |
| 110 | + * of the back button if the searchbar |
| 111 | + * is used in a toolbar regardless of |
| 112 | + * the searchbar size. |
| 113 | + */ |
| 114 | + @include globals.position-horizontal(9px, null); |
| 115 | +} |
| 116 | + |
| 117 | +:host-context(ion-toolbar).searchbar-should-show-cancel .searchbar-input { |
| 118 | + /** |
| 119 | + * Padding start is based on |
| 120 | + * the alignment of the back button, |
| 121 | + * the size of the leading icon (search or cancel), |
| 122 | + * and the gap between the icon and the input. |
| 123 | + */ |
| 124 | + padding-inline-start: calc(9px + globals.$ion-scale-500 + globals.$ion-space-200); |
| 125 | +} |
| 126 | + |
117 | 127 | // Searchbar States |
118 | 128 | // -------------------------------------------------- |
119 | 129 |
|
|
171 | 181 | /** |
172 | 182 | * Padding start is based on |
173 | 183 | * desired padding from design, |
174 | | - * the size of the search icon, |
| 184 | + * the size of the leading icon (search or cancel), |
175 | 185 | * and the gap between the icon and the input. |
176 | 186 | * |
177 | 187 | * Padding end is based on |
178 | 188 | * desired padding from design, |
179 | | - * the size of the clear icon, |
| 189 | + * the size of the trailing icon (clear), |
180 | 190 | * and the gap between the icon and the input. |
181 | 191 | */ |
182 | | - @include globals.padding-horizontal(calc(globals.$ion-space-400 + globals.$ion-scale-400 + globals.$ion-space-200)); |
| 192 | + @include globals.padding-horizontal( |
| 193 | + calc(globals.$ion-space-400 + globals.$ion-scale-500 + globals.$ion-space-200), |
| 194 | + calc(globals.$ion-space-400 + globals.$ion-scale-400 + globals.$ion-space-200) |
| 195 | + ); |
183 | 196 |
|
184 | 197 | min-height: globals.$ion-scale-1200; |
185 | 198 | } |
|
192 | 205 |
|
193 | 206 | :host(.searchbar-size-medium) .searchbar-clear-button { |
194 | 207 | // End is based on the desired padding end from design. |
195 | | - @include globals.position-horizontal(null, globals.$ion-scale-400); |
| 208 | + @include globals.position-horizontal(null, globals.$ion-space-400); |
196 | 209 | } |
197 | 210 |
|
198 | 211 | /* Large */ |
199 | 212 | :host(.searchbar-size-large) .searchbar-input { |
200 | 213 | /** |
201 | 214 | * Padding start is based on |
202 | 215 | * desired padding from design, |
203 | | - * the size of the search icon, |
| 216 | + * the size of the leading icon (search or cancel), |
204 | 217 | * and the gap between the icon and the input. |
205 | 218 | * |
206 | 219 | * Padding end is based on |
207 | 220 | * desired padding from design, |
208 | | - * the size of the clear icon, |
| 221 | + * the size of the trailing icon (clear), |
209 | 222 | * and the gap between the icon and the input. |
210 | 223 | */ |
211 | | - @include globals.padding-horizontal(calc(globals.$ion-space-500 + globals.$ion-scale-400 + globals.$ion-space-200)); |
| 224 | + @include globals.padding-horizontal( |
| 225 | + calc(globals.$ion-space-500 + globals.$ion-scale-500 + globals.$ion-space-200), |
| 226 | + calc(globals.$ion-space-500 + globals.$ion-scale-400 + globals.$ion-space-200) |
| 227 | + ); |
212 | 228 |
|
213 | 229 | min-height: globals.$ion-scale-1400; |
214 | 230 | } |
|
221 | 237 |
|
222 | 238 | :host(.searchbar-size-large) .searchbar-clear-button { |
223 | 239 | // End is based on the desired padding end from design. |
224 | | - @include globals.position-horizontal(null, globals.$ion-scale-500); |
| 240 | + @include globals.position-horizontal(null, globals.$ion-space-500); |
225 | 241 | } |
0 commit comments