Skip to content

Commit

Permalink
Fix Edge bounce and restore original transition easing (#27279)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens authored and XhmikosR committed Oct 31, 2018
1 parent f20e46e commit 96b49d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
35 changes: 6 additions & 29 deletions scss/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,55 +23,32 @@
position: relative;
width: 100%;
overflow: hidden;
@include clearfix();
}

.carousel-item {
position: relative;
display: none;
align-items: center;
float: left;
width: 100%;
backface-visibility: hidden;
perspective: 1000px;
margin-right: -100%;
@include transition($carousel-transition);
}

.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
@include transition($carousel-transition);
}

.carousel-item-next,
.carousel-item-prev {
position: absolute;
top: 0;
}

.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
transform: translateX(0);

@supports (transform-style: preserve-3d) {
transform: translate3d(0, 0, 0);
}
}

.carousel-item-next,
.carousel-item-next:not(.carousel-item-left),
.active.carousel-item-right {
transform: translateX(100%);

@supports (transform-style: preserve-3d) {
transform: translate3d(100%, 0, 0);
}
}

.carousel-item-prev,
.carousel-item-prev:not(.carousel-item-right),
.active.carousel-item-left {
transform: translateX(-100%);

@supports (transform-style: preserve-3d) {
transform: translate3d(-100%, 0, 0);
}
}


Expand Down
2 changes: 1 addition & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ $carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml,%3csvg
$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e"), "#", "%23") !default;

$carousel-transition-duration: .6s !default;
$carousel-transition: transform $carousel-transition-duration ease !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)
$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)


// Close
Expand Down

0 comments on commit 96b49d7

Please sign in to comment.