// Sets the open position for the content
@at-root .#{$maincontent-class}.is-open-#{$position} {
- transform: translateX($size);
+ &.has-transition-push {
+ transform: translateX($size);
+ }
}
}
@else if $position == right {
// Sets the open position for the content
@at-root .#{$maincontent-class}.is-open-#{$position} {
- transform: translateX(-$size);
+ &.has-transition-push {
+ transform: translateX(-$size);
+ }
}
}
@else if $position == top {
// Sets the open position for the content
@at-root .#{$maincontent-class}.is-open-#{$position} {
- transform: translateY($size);
+ &.has-transition-push {
+ transform: translateY($size);
+ }
}
}
@else if $position == bottom {
// Sets the open position for the content
@at-root .#{$maincontent-class}.is-open-#{$position} {
- transform: translateY(-$size);
+ &.has-transition-push {
+ transform: translateY(-$size);
+ }
}
}
transition: transform $offcanvas-transition-length $offcanvas-transition-timing;
backface-visibility: hidden;
- // Preserve transform none on overlap transition (override position based translate)
- &.has-transition-overlap {
- transform: none;
+ // Transform scope until the element is closed (makes sure transitionend gets triggered)
+ &.has-transition-push {
+ transform: translate(0, 0);
}
}