Skip to content

Commit

Permalink
Drop transition on .form-check, keep on .form-switch
Browse files Browse the repository at this point in the history
To avoid breaking changes, turns -check-transition to null, then adds a new -switch-transition variable
  • Loading branch information
mdo committed Jan 15, 2021
1 parent a8aede0 commit 987715f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scss/_variables.scss
Expand Up @@ -692,11 +692,11 @@ $form-check-padding-start: $form-check-input-width + .5em !defaul
$form-check-margin-bottom: .125rem !default;
$form-check-label-color: null !default;
$form-check-label-cursor: null !default;
$form-check-transition: background-color .15s ease-in-out, background-position .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
$form-check-transition: null !default;

$form-check-input-active-filter: brightness(90%) !default;

$form-check-input-bg: $body-bg !default;
$form-check-input-bg: $input-bg !default;
$form-check-input-border: 1px solid rgba(0, 0, 0, .25) !default;
$form-check-input-border-radius: .25em !default;
$form-check-radio-border-radius: 50% !default;
Expand All @@ -723,6 +723,7 @@ $form-switch-width: 2em !default;
$form-switch-padding-start: $form-switch-width + .5em !default;
$form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default;
$form-switch-border-radius: $form-switch-width !default;
$form-switch-transition: background-position .15s ease-in-out !default;

$form-switch-focus-color: $input-focus-border-color !default;
$form-switch-focus-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-focus-color}'/></svg>") !default;
Expand Down
1 change: 1 addition & 0 deletions scss/forms/_form-check.scss
Expand Up @@ -113,6 +113,7 @@
background-image: escape-svg($form-switch-bg-image);
background-position: left center;
@include border-radius($form-switch-border-radius);
@include transition($form-switch-transition);

&:focus {
background-image: escape-svg($form-switch-focus-bg-image);
Expand Down

0 comments on commit 987715f

Please sign in to comment.