]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Tweak .form-select padding (#32419)
authorMark Otto <markd.otto@gmail.com>
Mon, 28 Dec 2020 06:27:03 +0000 (22:27 -0800)
committerGitHub <noreply@github.com>
Mon, 28 Dec 2020 06:27:03 +0000 (08:27 +0200)
* Tweak .form-select padding

* Simplify the padding entirely

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
scss/_variables.scss
scss/forms/_form-select.scss

index 62fbc0d4d6f299ee87df616c7192ac54ca0ac162..3fc03a08e58e38b8d979dc4104bf280a4530ad22 100644 (file)
@@ -744,7 +744,7 @@ $form-select-padding-y:             $input-padding-y !default;
 $form-select-padding-x:             $input-padding-x !default;
 $form-select-font-family:           $input-font-family !default;
 $form-select-font-size:             $input-font-size !default;
-$form-select-indicator-padding:     1rem !default; // Extra padding to account for the presence of the background-image based indicator
+$form-select-indicator-padding:     $form-select-padding-x * 3 !default; // Extra padding for background-image
 $form-select-font-weight:           $input-font-weight !default;
 $form-select-line-height:           $input-line-height !default;
 $form-select-color:                 $input-color !default;
@@ -757,8 +757,8 @@ $form-select-bg-size:               16px 12px !default; // In pixels because ima
 $form-select-indicator-color:       $gray-800 !default;
 $form-select-indicator:             url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-select-indicator-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>") !default;
 
-$form-select-feedback-icon-padding-end: add(1em * .75, (2 * $form-select-padding-y * .75) + $form-select-padding-x + $form-select-indicator-padding) !default;
-$form-select-feedback-icon-position:    center right ($form-select-padding-x + $form-select-indicator-padding) !default;
+$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;
+$form-select-feedback-icon-position:    center right $form-select-indicator-padding !default;
 $form-select-feedback-icon-size:        $input-height-inner-half $input-height-inner-half !default;
 
 $form-select-border-width:        $input-border-width !default;
index a89fb94e205ea4a48c080cc81cf23397ba28c32d..15d5061ad6d2abc613fe9e78497dcc6b04a05aa2 100644 (file)
@@ -6,7 +6,7 @@
 .form-select {
   display: block;
   width: 100%;
-  padding: $form-select-padding-y ($form-select-padding-x + $form-select-indicator-padding) $form-select-padding-y $form-select-padding-x;
+  padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
   font-family: $form-select-font-family;
   @include font-size($form-select-font-size);
   font-weight: $form-select-font-weight;