Skip to content

Commit

Permalink
Add new variables for form feedback tooltips (#26959)
Browse files Browse the repository at this point in the history
Fixes #26886
  • Loading branch information
mdo authored Sep 19, 2018
1 parent f9142bd commit 0bec1c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,14 @@ $tooltip-arrow-width: .8rem !default;
$tooltip-arrow-height: .4rem !default;
$tooltip-arrow-color: $tooltip-bg !default;

// Form tooltips must come after regular tooltips
$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;
$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;
$form-feedback-tooltip-font-size: $tooltip-font-size !default;
$form-feedback-tooltip-line-height: $line-height-base !default;
$form-feedback-tooltip-opacity: $tooltip-opacity !default;
$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;


// Popovers

Expand Down
10 changes: 5 additions & 5 deletions scss/mixins/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
z-index: 5;
display: none;
max-width: 100%; // Contain to parent when possible
padding: $tooltip-padding-y $tooltip-padding-x;
padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
margin-top: .1rem;
font-size: $tooltip-font-size;
line-height: $line-height-base;
font-size: $form-feedback-tooltip-font-size;
line-height: $form-feedback-tooltip-line-height;
color: color-yiq($color);
background-color: rgba($color, $tooltip-opacity);
@include border-radius($tooltip-border-radius);
background-color: rgba($color, $form-feedback-tooltip-opacity);
@include border-radius($form-feedback-tooltip-border-radius);
}

.form-control {
Expand Down

0 comments on commit 0bec1c8

Please sign in to comment.