aboutsummaryrefslogtreecommitdiff
path: root/scss/forms
diff options
context:
space:
mode:
authorLouis-Maxime Piton <[email protected]>2022-10-06 08:12:00 +0200
committerGitHub <[email protected]>2022-10-06 08:12:00 +0200
commitbf6240dad9a466e9d3bc682abf416e9e5b4c66df (patch)
tree1b144dc79cc72ca1f4500d47fc43340aef36e662 /scss/forms
parent5975ca65c552184889df25b8cd1c62e3a58ad621 (diff)
downloadbootstrap-bf6240dad9a466e9d3bc682abf416e9e5b4c66df.tar.xz
bootstrap-bf6240dad9a466e9d3bc682abf416e9e5b4c66df.zip
Add an artificial background to floating labels (#37125)
Diffstat (limited to 'scss/forms')
-rw-r--r--scss/forms/_floating-labels.scss11
1 files changed, 11 insertions, 0 deletions
diff --git a/scss/forms/_floating-labels.scss b/scss/forms/_floating-labels.scss
index 6e5c9a75f..93c1c2205 100644
--- a/scss/forms/_floating-labels.scss
+++ b/scss/forms/_floating-labels.scss
@@ -1,6 +1,17 @@
.form-floating {
position: relative;
+ &::before {
+ position: absolute;
+ top: $input-border-width;
+ left: $input-border-width;
+ width: subtract(100%, add($input-height-inner-quarter, $input-height-inner-half));
+ height: $form-floating-label-height;
+ content: "";
+ background-color: $input-bg;
+ @include border-radius($input-border-radius);
+ }
+
> .form-control,
> .form-control-plaintext,
> .form-select {