Skip to content

Conversation

@MartijnCuppens
Copy link
Member

Closes #30526. Transitioning the background-position for the switch ain't ideal, but since it's such a small element, I don't expect any dramatic performance downsides.

@XhmikosR XhmikosR requested a review from mdo April 7, 2020 18:28
Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we ever consider splitting the transition variables out to reduce repetition?

$form-check-transition-duration: .15s !default;
$form-check-transition-timing: ease-in-out !default;
$form-check-transition-property: background-color, background-position, opacity !default;

Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dupe

@MartijnCuppens
Copy link
Member Author

Would we ever consider splitting the transition variables out to reduce repetition?

Yup, that might be a lot clearer. I sticked to this way to be consistent with the buttons and inputs.

I think we better tackle this in another PR, and have a look at the benefits/disadvantages there.

@MartijnCuppens MartijnCuppens merged commit 5e65b12 into master Apr 9, 2020
@MartijnCuppens MartijnCuppens deleted the master-mc-form-check-transitions branch April 9, 2020 06:07
@Justsnoopy30
Copy link

Justsnoopy30 commented Apr 10, 2020

Side affect: Now when a change occurs, like a checkbox being checked or a radio choice being changed, during the transition, the box/radio slightly shifts (from an offset position) down and to the right to be in the correct, centered position.

olsza pushed a commit to olsza/bootstrap that referenced this pull request Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrap v5 removes animations even when prefers-reduced-motion is unset.

5 participants