0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

fix(forms): prevent color control from shrinking (#34445)

* fix(forms): prevent color control from shrinking

Fixes #34195

Setting `min-width` alongside `max-width` wouldn't make any sense IMHO. The only concern I have is whether we should introduce a dedicated variable for said width?

* feat(forms): introduce ` $form-color-width`

* feat(forms): use ` $form-color-width`

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Gaël Poupard 2021-07-14 08:19:28 +02:00 committed by GitHub
parent e45b25e08e
commit 054f8781a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -847,6 +847,8 @@ $input-height-sm: add($input-line-height * 1em, add($input
$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
$form-color-width: 3rem !default;
// scss-docs-end form-input-variables
// scss-docs-start form-check-variables

View File

@ -199,7 +199,7 @@ textarea {
// stylelint-enable selector-no-qualifying-type
.form-control-color {
max-width: 3rem;
width: $form-color-width;
height: auto; // Override fixed browser height
padding: $input-padding-y;