From 32930bc06e2a75f05c41948a7e7dff84cc9c9b62 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 6 May 2021 15:51:23 -0700 Subject: Add support for Bootstrap Icons on floating label forms --- scss/forms/_floating-labels.scss | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'scss/forms') diff --git a/scss/forms/_floating-labels.scss b/scss/forms/_floating-labels.scss index 8b2e2b8eb..915437331 100644 --- a/scss/forms/_floating-labels.scss +++ b/scss/forms/_floating-labels.scss @@ -59,3 +59,23 @@ } // stylelint-enable no-duplicate-selectors } + +.form-floating-icon { + position: absolute; + top: 0; + bottom: 0; + left: 0; + display: flex; + align-items: center; + justify-content: center; + width: 2.5rem + $form-floating-padding-x; + + ~ label { + left: 2.5rem; + } + + ~ .form-control, + ~ .form-select { + padding-left: 2.5rem + $form-floating-padding-x; + } +} -- cgit v1.2.3