From: Mark Otto Date: Thu, 27 Oct 2016 21:41:12 +0000 (-0700) Subject: Calculcate the top offset for custom control indicators X-Git-Tag: v4.0.0-alpha.6~482^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F21034%2Fhead;p=thirdparty%2Fbootstrap.git Calculcate the top offset for custom control indicators Fixes #21023. Uses some math functions to determine what the offset should be. This is helpful for those who customize the size of their indicators and still want them vertically centered. --- diff --git a/scss/_custom-forms.scss b/scss/_custom-forms.scss index e74f5c744a..18aedc66fa 100644 --- a/scss/_custom-forms.scss +++ b/scss/_custom-forms.scss @@ -61,7 +61,7 @@ .custom-control-indicator { position: absolute; - top: .25rem; + top: (($line-height-base - $custom-control-indicator-size) / 2); left: 0; display: block; width: $custom-control-indicator-size;