From 2a1341b910dfb1187dd9fceebd2b3be14e825e28 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 28 Apr 2023 19:02:23 +0000 Subject: update bootstrap --- .../bootstrap/scss/forms/_floating-labels.scss | 33 ++++++++++++---------- .../twbs/bootstrap/scss/forms/_form-control.scss | 19 +++++++++++-- vendor/twbs/bootstrap/scss/forms/_form-select.scss | 1 - vendor/twbs/bootstrap/scss/forms/_input-group.scss | 2 +- 4 files changed, 35 insertions(+), 20 deletions(-) (limited to 'vendor/twbs/bootstrap/scss/forms') diff --git a/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss b/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss index aaed53845..7d04723e3 100644 --- a/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss +++ b/vendor/twbs/bootstrap/scss/forms/_floating-labels.scss @@ -1,17 +1,6 @@ .form-floating { position: relative; - &::before:not(.form-control:disabled) { - 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 { @@ -23,7 +12,7 @@ position: absolute; top: 0; left: 0; - width: 100%; + z-index: 2; height: 100%; // allow textareas padding: $form-floating-padding-y $form-floating-padding-x; overflow: hidden; @@ -66,14 +55,24 @@ > .form-control-plaintext, > .form-select { ~ label { - opacity: $form-floating-label-opacity; + color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity}); transform: $form-floating-label-transform; + + &::after { + position: absolute; + inset: $form-floating-padding-y ($form-floating-padding-x * .5); + z-index: -1; + height: $form-floating-label-height; + content: ""; + background-color: $input-bg; + @include border-radius($input-border-radius); + } } } // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped > .form-control:-webkit-autofill { ~ label { - opacity: $form-floating-label-opacity; + color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity}); transform: $form-floating-label-transform; } } @@ -84,7 +83,11 @@ } } - > .form-control:disabled ~ label { + > :disabled ~ label { color: $form-floating-label-disabled-color; + + &::after { + background-color: $input-disabled-bg; + } } } diff --git a/vendor/twbs/bootstrap/scss/forms/_form-control.scss b/vendor/twbs/bootstrap/scss/forms/_form-control.scss index c81e3b4ea..ca2a7df4c 100644 --- a/vendor/twbs/bootstrap/scss/forms/_form-control.scss +++ b/vendor/twbs/bootstrap/scss/forms/_form-control.scss @@ -44,12 +44,24 @@ } } - // Add some height to date inputs on iOS - // https://github.com/twbs/bootstrap/issues/23307 - // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved &::-webkit-date-and-time-value { + // On Android Chrome, form-control's "width: 100%" makes the input width too small + // Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109 + // + // On iOS Safari, form-control's "appearance: none" + "width: 100%" makes the input width too small + // Tested under iOS 16.2 / Safari 16.2 + min-width: 85px; // Seems to be a good minimum safe width + + // Add some height to date inputs on iOS + // https://github.com/twbs/bootstrap/issues/23307 + // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved // Multiply line-height by 1em if it has no unit height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height); + + // Android Chrome type="date" is taller than the other inputs + // because of "margin: 1px 24px 1px 4px" inside the shadow DOM + // Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109 + margin: 0; } // Prevent excessive date input height in Webkit @@ -193,6 +205,7 @@ textarea { } &::-webkit-color-swatch { + border: 0 !important; // stylelint-disable-line declaration-no-important @include border-radius($input-border-radius); } diff --git a/vendor/twbs/bootstrap/scss/forms/_form-select.scss b/vendor/twbs/bootstrap/scss/forms/_form-select.scss index 45b0b2686..0b26323ff 100644 --- a/vendor/twbs/bootstrap/scss/forms/_form-select.scss +++ b/vendor/twbs/bootstrap/scss/forms/_form-select.scss @@ -9,7 +9,6 @@ display: block; width: 100%; padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x; - -moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636 font-family: $form-select-font-family; @include font-size($form-select-font-size); font-weight: $form-select-font-weight; diff --git a/vendor/twbs/bootstrap/scss/forms/_input-group.scss b/vendor/twbs/bootstrap/scss/forms/_input-group.scss index d6370ed7f..58e4d409c 100644 --- a/vendor/twbs/bootstrap/scss/forms/_input-group.scss +++ b/vendor/twbs/bootstrap/scss/forms/_input-group.scss @@ -121,7 +121,7 @@ } > :not(:first-child):not(.dropdown-menu)#{$validation-messages} { - margin-left: calc($input-border-width * -1); // stylelint-disable-line function-disallowed-list + margin-left: calc(#{$input-border-width} * -1); // stylelint-disable-line function-disallowed-list @include border-start-radius(0); } -- cgit v1.2.3