The collapse plugin utilizes a few classes to handle the heavy lifting:
- `.collapse` hides the content
- - `.collapse.active` shows the content
+ - `.collapse.show` shows the content
- `.collapsing` is added when the transition starts, and removed when it finishes
-These classes can be found in `_animation.scss`.
+These classes can be found in `_transitions.scss`.
### Via data attributes
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
- @include transition(transform .3s ease-out);
+ @include transition($modal-transition);
transform: translate(0, -25%);
}
- &.active .modal-dialog { transform: translate(0, 0); }
+ &.show .modal-dialog { transform: translate(0, 0); }
}
.modal-open .modal {
overflow-x: hidden;
.fade {
opacity: 0;
-
- @include transition(opacity .15s linear);
+ @include transition($transition-fade);
- &.active {
+ &.show {
opacity: 1;
}
}