Skip to content

Commit

Permalink
Fix border on input group elements and custom form inputs
Browse files Browse the repository at this point in the history
c3e4cbd changed the border of input elements to be translucent. This commit makes
input group elements and custom form inputs follow the same pattern.

Fixes #21098
  • Loading branch information
nwoltman committed May 13, 2017
1 parent aa68ca3 commit 2dd90eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scss/_custom-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
color: $custom-select-color;
vertical-align: middle;
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
background-clip: padding-box;
background-size: $custom-select-bg-size;
border: $custom-select-border-width solid $custom-select-border-color;
@include border-radius($custom-select-border-radius);
Expand Down Expand Up @@ -216,11 +217,13 @@
z-index: 5;
height: $custom-file-height;
padding: $custom-file-padding-x $custom-file-padding-y;
overflow: hidden;
line-height: $custom-file-line-height;
color: $custom-file-color;
pointer-events: none;
user-select: none;
background-color: $custom-file-bg;
background-clip: padding-box;
border: $custom-file-border-width solid $custom-file-border-color;
@include border-radius($custom-file-border-radius);
@include box-shadow($custom-file-box-shadow);
Expand All @@ -233,18 +236,16 @@

&::before {
position: absolute;
top: -$custom-file-border-width;
right: -$custom-file-border-width;
bottom: -$custom-file-border-width;
top: 0;
right: 0;
z-index: 6;
display: block;
height: $custom-file-height;
padding: $custom-file-padding-x $custom-file-padding-y;
line-height: $custom-file-line-height;
color: $custom-file-button-color;
background-color: $custom-file-button-bg;
border: $custom-file-border-width solid $custom-file-border-color;
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
border-left: $custom-file-border-width solid $custom-file-border-color;
}

@each $lang, $text in map-get($custom-file-text, button-label) {
Expand Down
3 changes: 3 additions & 0 deletions scss/_input-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
color: $input-color;
text-align: center;
background-color: $input-group-addon-bg;
background-clip: padding-box;
border: $input-btn-border-width solid $input-group-addon-border-color;
@include border-radius($input-border-radius);

Expand Down Expand Up @@ -144,6 +145,8 @@
// element above the siblings.
> .btn {
position: relative;
background-clip: padding-box;
border: $input-btn-border-width solid $input-group-btn-border-color;

+ .btn {
margin-left: (-$input-btn-border-width);
Expand Down
1 change: 1 addition & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ $form-group-margin-bottom: 1rem !default;

$input-group-addon-bg: $gray-lighter !default;
$input-group-addon-border-color: $input-border-color !default;
$input-group-btn-border-color: $input-border-color !default;

$custom-control-gutter: 1.5rem !default;
$custom-control-spacer-y: .25rem !default;
Expand Down

0 comments on commit 2dd90eb

Please sign in to comment.