-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Add checkbox transition #30528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checkbox transition #30528
Conversation
mdo
left a comment
There was a problem hiding this 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;There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dupe
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. |
|
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. |
Closes #30526. Transitioning the
background-positionfor the switch ain't ideal, but since it's such a small element, I don't expect any dramatic performance downsides.