Skip to content

Commit

Permalink
Add new variables for form feedback tooltips
Browse files Browse the repository at this point in the history
Fixes #26886
  • Loading branch information
mdo authored and XhmikosR committed Sep 18, 2018
1 parent 787441d commit a96014d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,13 @@ $form-feedback-icon-valid: str-replace(url("data:image/svg+xml;charset=
$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;
$form-feedback-icon-invalid: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-feedback-icon-invalid-color}' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E"), "#", "%23") !default;

$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;


// Dropdowns
//
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-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 a96014d

Please sign in to comment.