|
1 | 1 | @use "../../themes/ionic/ionic.globals.scss" as globals; |
2 | 2 | @use "searchbar.common"; |
3 | | -@use "./searchbar.ionic.vars" as vars; |
4 | 3 |
|
5 | 4 | // Ionic Searchbar |
6 | 5 | // -------------------------------------------------- |
|
29 | 28 | // ----------------------------------------- |
30 | 29 |
|
31 | 30 | .searchbar-search-icon { |
32 | | - @include globals.position( |
33 | | - vars.$searchbar-ionic-input-search-icon-size, |
34 | | - null, |
35 | | - null, |
36 | | - vars.$searchbar-ionic-input-search-icon-size |
37 | | - ); |
| 31 | + // Position is based on the size of the search icon. |
| 32 | + @include globals.position(globals.$ionic-scale-400, null, null, globals.$ionic-scale-400); |
38 | 33 |
|
39 | | - width: vars.$searchbar-ionic-input-search-icon-size; |
40 | | - height: vars.$searchbar-ionic-input-search-icon-size; |
| 34 | + width: globals.$ionic-scale-400; |
| 35 | + height: globals.$ionic-scale-400; |
41 | 36 | } |
42 | 37 |
|
43 | 38 | // Searchbar Input Field |
44 | 39 | // ----------------------------------------- |
45 | 40 |
|
46 | 41 | .searchbar-input { |
| 42 | + /** |
| 43 | + * Padding start is based on |
| 44 | + * desired padding from design, |
| 45 | + * the size of the search icon, |
| 46 | + * and the gap between the icon and the input. |
| 47 | + * |
| 48 | + * Padding end is based on |
| 49 | + * desired padding from design, |
| 50 | + * the size of the clear icon, |
| 51 | + * and the gap between the icon and the input. |
| 52 | + */ |
47 | 53 | @include globals.padding( |
48 | 54 | globals.$ionic-space-300, |
49 | | - vars.$searchbar-ionic-padding-end, |
| 55 | + calc(globals.$ionic-space-400 + globals.$ionic-scale-400 + globals.$ionic-space-200), |
50 | 56 | globals.$ionic-space-300, |
51 | | - vars.$searchbar-ionic-padding-start |
| 57 | + calc(globals.$ionic-space-400 + globals.$ionic-scale-400 + globals.$ionic-space-200) |
52 | 58 | ); |
53 | 59 |
|
54 | 60 | min-height: globals.$ionic-scale-1200; |
|
60 | 66 | // ----------------------------------------- |
61 | 67 |
|
62 | 68 | .searchbar-clear-button { |
63 | | - @include globals.position( |
64 | | - vars.$searchbar-ionic-input-clear-icon-size, |
65 | | - vars.$searchbar-ionic-input-clear-icon-size, |
66 | | - null, |
67 | | - null |
68 | | - ); |
| 69 | + // Position is based on the size of the clear icon. |
| 70 | + @include globals.position(globals.$ionic-scale-400, globals.$ionic-scale-400, null, null); |
69 | 71 |
|
70 | | - width: vars.$searchbar-ionic-input-clear-icon-size; |
71 | | - height: vars.$searchbar-ionic-input-clear-icon-size; |
| 72 | + width: globals.$ionic-scale-400; |
| 73 | + height: globals.$ionic-scale-400; |
72 | 74 |
|
73 | 75 | background-color: transparent; |
74 | 76 |
|
|
0 commit comments