Vertically center clear icon within search form element

Rely on css top/transform to center it instead of calculations.

I84fc4224d5107188265d8ec0a26c0388664949a5 should be merged shortly after
this one.

Bug: T233156
Change-Id: I6e00f851ecb4e1ba8c1ef5d90bcc4310d66a820e
This commit is contained in:
Nicholas Ray 2019-09-30 14:33:20 -06:00
parent a65909a87e
commit 2b9929a5f9

View file

@ -9,12 +9,15 @@
top: @siteHeaderHeight;
}
@icon-height-halved: unit( ( @icon-touch-area-sm / 2 ) / @font-size-browser, em );
.clear {
position: absolute;
top: ( @siteHeaderHeight / 2 ) - @icon-height-halved;
top: 50%;
right: 0;
transform: translateY( -50% );
}
.search-box {
position: relative;
}
}