Skip to content

Commit 739abe1

Browse files
committed
refactor(searchbar): remove vars file
1 parent 614bf7b commit 739abe1

File tree

2 files changed

+21
-42
lines changed

2 files changed

+21
-42
lines changed

core/src/components/searchbar/searchbar.ionic.scss

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@use "../../themes/ionic/ionic.globals.scss" as globals;
22
@use "searchbar.common";
3-
@use "./searchbar.ionic.vars" as vars;
43

54
// Ionic Searchbar
65
// --------------------------------------------------
@@ -29,26 +28,33 @@
2928
// -----------------------------------------
3029

3130
.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);
3833

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;
4136
}
4237

4338
// Searchbar Input Field
4439
// -----------------------------------------
4540

4641
.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+
*/
4753
@include globals.padding(
4854
globals.$ionic-space-300,
49-
vars.$searchbar-ionic-padding-end,
55+
calc(globals.$ionic-space-400 + globals.$ionic-scale-400 + globals.$ionic-space-200),
5056
globals.$ionic-space-300,
51-
vars.$searchbar-ionic-padding-start
57+
calc(globals.$ionic-space-400 + globals.$ionic-scale-400 + globals.$ionic-space-200)
5258
);
5359

5460
min-height: globals.$ionic-scale-1200;
@@ -60,15 +66,11 @@
6066
// -----------------------------------------
6167

6268
.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);
6971

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;
7274

7375
background-color: transparent;
7476

core/src/components/searchbar/searchbar.ionic.vars.scss

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)