1 // Wrapper for the slide container and indicators
17 @include transition($carousel-transition);
18 backface-visibility: hidden;
22 .carousel-item.active,
34 // CSS3 transforms when supported by the browser
35 .carousel-item-next.carousel-item-left,
36 .carousel-item-prev.carousel-item-right {
37 transform: translateX(0);
39 @supports (transform-style: preserve-3d) {
40 transform: translate3d(0, 0, 0);
45 .active.carousel-item-right {
46 transform: translateX(100%);
48 @supports (transform-style: preserve-3d) {
49 transform: translate3d(100%, 0, 0);
54 .active.carousel-item-left {
55 transform: translateX(-100%);
57 @supports (transform-style: preserve-3d) {
58 transform: translate3d(-100%, 0, 0);
64 // Left/right controls for nav
67 .carousel-control-prev,
68 .carousel-control-next {
72 // Use flex for alignment (1-3)
73 display: flex; // 1. allow flex styles
74 align-items: center; // 2. vertically center contents
75 justify-content: center; // 3. horizontally center contents
76 width: $carousel-control-width;
77 color: $carousel-control-color;
79 opacity: $carousel-control-opacity;
80 // We can't have a transition here because WebKit cancels the carousel
81 // animation if you trip this while in the middle of another animation.
84 @include hover-focus {
85 color: $carousel-control-color;
86 text-decoration: none;
91 .carousel-control-prev {
93 @if $enable-gradients {
94 background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
97 .carousel-control-next {
99 @if $enable-gradients {
100 background: linear-gradient(270deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
105 .carousel-control-prev-icon,
106 .carousel-control-next-icon {
107 display: inline-block;
108 width: $carousel-control-icon-width;
109 height: $carousel-control-icon-width;
110 background: transparent no-repeat center center;
111 background-size: 100% 100%;
113 .carousel-control-prev-icon {
114 background-image: $carousel-control-prev-icon-bg;
116 .carousel-control-next-icon {
117 background-image: $carousel-control-next-icon-bg;
121 // Optional indicator pips
123 // Add an ordered list with the following class and add a list item for each
124 // slide your carousel holds.
126 .carousel-indicators {
133 justify-content: center;
134 padding-left: 0; // override <ol> default
135 // Use the .carousel-control's width as margin so we don't overlay those
136 margin-right: $carousel-control-width;
137 margin-left: $carousel-control-width;
143 width: $carousel-indicator-width;
144 height: $carousel-indicator-height;
145 margin-right: $carousel-indicator-spacer;
146 margin-left: $carousel-indicator-spacer;
148 background-color: rgba($carousel-indicator-active-bg, .5);
150 // Use pseudo classes to increase the hit area by 10px on top and bottom.
155 display: inline-block;
164 display: inline-block;
172 background-color: $carousel-indicator-active-bg;
183 right: ((100% - $carousel-caption-width) / 2);
185 left: ((100% - $carousel-caption-width) / 2);
188 padding-bottom: 20px;
189 color: $carousel-caption-color;