I have the following codepen: https://codepen.io/ftahir192/pen/paeYzV
The codepen consists of overriding styles for the popular Select2 plugin.
I'm running into some problems with vertically aligning the search icon and search input with the search box. As you can see in the codepen, the search icon is pushed slightly to the top, and the search text although looks like it is in the center, does not work nicely when changing the font size.
I've been trying to figure this out for a few hours but am at loss with why I can't get anything like vertical-align: middle;
or adding some margin-top
/padding-top
to fix the error. Ideally I'm trying to make it so that the icon and the search text are responsive with eachother, i.e. one vertical align or margin property that alignsthe entire select2-search class.
I believe the following code in the css is the culprit:
.select2-search {
font-size: $search-box-font-size;
font-weight: bold;
vertical-align: middle;
Any help will be much appreciated!