Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework search icon styles #3900

Merged
merged 1 commit into from Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -17,7 +17,7 @@ $large-input-size: 50px;
height: $large-input-size;

.gem-c-search__icon {
@include icon-positioning($large-input-size);
transform: scale(.4);
}
}
}
Expand Down Expand Up @@ -106,19 +106,6 @@ $large-input-size: 50px;
}
}

@mixin icon-positioning($container-size) {
$icon-dimension: 20px;
$icon-position: calc(($container-size - $icon-dimension) / 2);

display: block;
pointer-events: none;
position: absolute;
height: $icon-dimension;
width: $icon-dimension;
top: $icon-position;
left: $icon-position;
}

.gem-c-search__submit {
border: 0;
cursor: pointer;
Expand All @@ -135,7 +122,13 @@ $large-input-size: 50px;
overflow: hidden;

.gem-c-search__icon {
@include icon-positioning($input-size);
pointer-events: none;
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
transform: scale(.5);
}

&:focus {
Expand Down