aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/scss/forms/_floating-labels.scss')
-rw-r--r--vendor/twbs/bootstrap/scss/forms/_floating-labels.scss17
1 files changed, 14 insertions, 3 deletions
diff --git a/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss b/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss
index 2f4295480..acefe4ebc 100644
--- a/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss
+++ b/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss
@@ -2,6 +2,7 @@
position: relative;
> .form-control,
+ > .form-control-plaintext,
> .form-select {
height: $form-floating-height;
line-height: $form-floating-line-height;
@@ -11,16 +12,20 @@
position: absolute;
top: 0;
left: 0;
+ width: 100%;
height: 100%; // allow textareas
padding: $form-floating-padding-y $form-floating-padding-x;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
pointer-events: none;
border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
transform-origin: 0 0;
@include transition($form-floating-transition);
}
- // stylelint-disable no-duplicate-selectors
- > .form-control {
+ > .form-control,
+ > .form-control-plaintext {
padding: $form-floating-padding-y $form-floating-padding-x;
&::placeholder {
@@ -46,6 +51,7 @@
> .form-control:focus,
> .form-control:not(:placeholder-shown),
+ > .form-control-plaintext,
> .form-select {
~ label {
opacity: $form-floating-label-opacity;
@@ -59,5 +65,10 @@
transform: $form-floating-label-transform;
}
}
- // stylelint-enable no-duplicate-selectors
+
+ > .form-control-plaintext {
+ ~ label {
+ border-width: $input-border-width 0; // Required to properly position label text - as explained above
+ }
+ }
}