Skip to content
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

WebKit CSS3 carousel transforms for supported devices #13074

Merged
merged 6 commits into from
Aug 3, 2014
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions less/carousel.less
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,26 @@
bottom: 20px;
}
}

// WebKit CSS3 transforms for supported devices
@media all and (-webkit-transform-3d) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we'd want to move the media query inside the .carousel block so as to improve mixin-ability.

Copy link
Author

Choose a reason for hiding this comment

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

Good point. Moved the media query into the .item class instead as I wasn't modifying the .carousel class.

.carousel {
.item {
.transition-transform(~'0.6s ease-in-out');
.backface-visibility(~'hidden');
.perspective(1000);
&.next, &.active.right {
.translate3d(100%, 0, 0);
left: 0;
}
&.prev, &.active.left {
.translate3d(-100%, 0, 0);
left: 0;
}
&.next.left, &.prev.right, &.active {
.translate3d(0, 0, 0);
left: 0;
}
}
}
}