|
11 | 11 | // 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
|
12 | 12 | // is the upcoming slide in transition.
|
13 | 13 |
|
14 |
| -.carousel { |
15 |
| - position: relative; |
16 |
| -} |
| 14 | +@if ($enable-bs4-deprecated) { |
| 15 | + .carousel { |
| 16 | + position: relative; |
| 17 | + } |
17 | 18 |
|
18 |
| -.carousel.pointer-event { |
19 |
| - touch-action: pan-y; |
20 |
| -} |
| 19 | + .carousel.pointer-event { |
| 20 | + touch-action: pan-y; |
| 21 | + } |
21 | 22 |
|
22 |
| -.carousel-inner { |
23 |
| - overflow: hidden; |
24 |
| - position: relative; |
25 |
| - width: 100%; |
| 23 | + .carousel-inner { |
| 24 | + overflow: hidden; |
| 25 | + position: relative; |
| 26 | + width: 100%; |
26 | 27 |
|
27 |
| - &::after { |
28 |
| - clear: both; |
29 |
| - content: ''; |
30 |
| - display: block; |
| 28 | + &::after { |
| 29 | + clear: both; |
| 30 | + content: ''; |
| 31 | + display: block; |
| 32 | + } |
31 | 33 | }
|
32 |
| -} |
33 | 34 |
|
34 |
| -.carousel-item { |
35 |
| - backface-visibility: hidden; |
36 |
| - display: none; |
37 |
| - float: left; |
38 |
| - margin-right: -100%; |
39 |
| - position: relative; |
| 35 | + .carousel-item { |
| 36 | + backface-visibility: hidden; |
| 37 | + display: none; |
| 38 | + float: left; |
| 39 | + margin-right: -100%; |
| 40 | + position: relative; |
40 | 41 |
|
41 |
| - @include transition($carousel-transition); |
| 42 | + @include transition($carousel-transition); |
42 | 43 |
|
43 |
| - width: 100%; |
44 |
| -} |
| 44 | + width: 100%; |
| 45 | + } |
45 | 46 |
|
46 |
| -.carousel-item.active, |
47 |
| -.carousel-item-next, |
48 |
| -.carousel-item-prev { |
49 |
| - display: block; |
50 |
| -} |
| 47 | + .carousel-item.active, |
| 48 | + .carousel-item-next, |
| 49 | + .carousel-item-prev { |
| 50 | + display: block; |
| 51 | + } |
51 | 52 |
|
52 |
| -.carousel-item-next:not(.carousel-item-left), |
53 |
| -.active.carousel-item-right { |
54 |
| - transform: translateX(100%); |
55 |
| -} |
| 53 | + .carousel-item-next:not(.carousel-item-left), |
| 54 | + .active.carousel-item-right { |
| 55 | + transform: translateX(100%); |
| 56 | + } |
56 | 57 |
|
57 |
| -.carousel-item-prev:not(.carousel-item-right), |
58 |
| -.active.carousel-item-left { |
59 |
| - transform: translateX(-100%); |
60 |
| -} |
| 58 | + .carousel-item-prev:not(.carousel-item-right), |
| 59 | + .active.carousel-item-left { |
| 60 | + transform: translateX(-100%); |
| 61 | + } |
61 | 62 |
|
62 |
| -// Alternate transitions |
| 63 | + // Alternate transitions |
63 | 64 |
|
64 |
| -.carousel-fade { |
65 |
| - .carousel-item { |
66 |
| - opacity: 0; |
67 |
| - transform: none; |
68 |
| - transition-property: opacity; |
69 |
| - } |
| 65 | + .carousel-fade { |
| 66 | + .carousel-item { |
| 67 | + opacity: 0; |
| 68 | + transform: none; |
| 69 | + transition-property: opacity; |
| 70 | + } |
70 | 71 |
|
71 |
| - .carousel-item.active, |
72 |
| - .carousel-item-next.carousel-item-left, |
73 |
| - .carousel-item-prev.carousel-item-right { |
74 |
| - opacity: 1; |
75 |
| - z-index: 1; |
76 |
| - } |
| 72 | + .carousel-item.active, |
| 73 | + .carousel-item-next.carousel-item-left, |
| 74 | + .carousel-item-prev.carousel-item-right { |
| 75 | + opacity: 1; |
| 76 | + z-index: 1; |
| 77 | + } |
77 | 78 |
|
78 |
| - .active.carousel-item-left, |
79 |
| - .active.carousel-item-right { |
80 |
| - opacity: 0; |
| 79 | + .active.carousel-item-left, |
| 80 | + .active.carousel-item-right { |
| 81 | + opacity: 0; |
81 | 82 |
|
82 |
| - @include transition(opacity 0s $carousel-transition-duration); |
| 83 | + @include transition(opacity 0s $carousel-transition-duration); |
83 | 84 |
|
84 |
| - z-index: 0; |
| 85 | + z-index: 0; |
| 86 | + } |
85 | 87 | }
|
86 |
| -} |
87 | 88 |
|
88 |
| -// Left/right controls for nav |
| 89 | + // Left/right controls for nav |
89 | 90 |
|
90 |
| -.carousel-control-prev, |
91 |
| -.carousel-control-next { |
92 |
| - align-items: center; |
93 |
| - bottom: 0; |
94 |
| - color: $carousel-control-color; |
95 |
| - display: flex; |
96 |
| - justify-content: center; |
97 |
| - opacity: $carousel-control-opacity; |
98 |
| - position: absolute; |
99 |
| - text-align: center; |
100 |
| - top: 0; |
| 91 | + .carousel-control-prev, |
| 92 | + .carousel-control-next { |
| 93 | + align-items: center; |
| 94 | + bottom: 0; |
| 95 | + color: $carousel-control-color; |
| 96 | + display: flex; |
| 97 | + justify-content: center; |
| 98 | + opacity: $carousel-control-opacity; |
| 99 | + position: absolute; |
| 100 | + text-align: center; |
| 101 | + top: 0; |
101 | 102 |
|
102 |
| - @include transition($carousel-control-transition); |
| 103 | + @include transition($carousel-control-transition); |
103 | 104 |
|
104 |
| - width: $carousel-control-width; |
105 |
| - z-index: 1; |
| 105 | + width: $carousel-control-width; |
| 106 | + z-index: 1; |
106 | 107 |
|
107 |
| - &:hover, |
108 |
| - &:focus { |
109 |
| - color: $carousel-control-color; |
110 |
| - opacity: $carousel-control-hover-opacity; |
111 |
| - outline: 0; |
112 |
| - text-decoration: none; |
| 108 | + &:hover, |
| 109 | + &:focus { |
| 110 | + color: $carousel-control-color; |
| 111 | + opacity: $carousel-control-hover-opacity; |
| 112 | + outline: 0; |
| 113 | + text-decoration: none; |
| 114 | + } |
113 | 115 | }
|
114 |
| -} |
115 |
| -.carousel-control-prev { |
116 |
| - @if $enable-gradients { |
117 |
| - background-image: linear-gradient( |
118 |
| - 90deg, |
119 |
| - rgba($black, 0.25), |
120 |
| - rgba($black, 0.001) |
121 |
| - ); |
| 116 | + .carousel-control-prev { |
| 117 | + @if $enable-gradients { |
| 118 | + background-image: linear-gradient( |
| 119 | + 90deg, |
| 120 | + rgba($black, 0.25), |
| 121 | + rgba($black, 0.001) |
| 122 | + ); |
| 123 | + } |
| 124 | + |
| 125 | + left: 0; |
122 | 126 | }
|
123 |
| - |
124 |
| - left: 0; |
125 |
| -} |
126 |
| -.carousel-control-next { |
127 |
| - @if $enable-gradients { |
128 |
| - background-image: linear-gradient( |
129 |
| - 270deg, |
130 |
| - rgba($black, 0.25), |
131 |
| - rgba($black, 0.001) |
132 |
| - ); |
| 127 | + .carousel-control-next { |
| 128 | + @if $enable-gradients { |
| 129 | + background-image: linear-gradient( |
| 130 | + 270deg, |
| 131 | + rgba($black, 0.25), |
| 132 | + rgba($black, 0.001) |
| 133 | + ); |
| 134 | + } |
| 135 | + |
| 136 | + right: 0; |
133 | 137 | }
|
134 | 138 |
|
135 |
| - right: 0; |
136 |
| -} |
137 |
| - |
138 |
| -// Icons for within |
| 139 | + // Icons for within |
139 | 140 |
|
140 |
| -.carousel-control-prev-icon, |
141 |
| -.carousel-control-next-icon { |
142 |
| - background: no-repeat 50% / 100% 100%; |
143 |
| - display: inline-block; |
144 |
| - height: $carousel-control-icon-width; |
145 |
| - width: $carousel-control-icon-width; |
146 |
| -} |
| 141 | + .carousel-control-prev-icon, |
| 142 | + .carousel-control-next-icon { |
| 143 | + background: no-repeat 50% / 100% 100%; |
| 144 | + display: inline-block; |
| 145 | + height: $carousel-control-icon-width; |
| 146 | + width: $carousel-control-icon-width; |
| 147 | + } |
147 | 148 |
|
148 |
| -.carousel-control-prev-icon { |
149 |
| - background-image: escape-svg($carousel-control-prev-icon-bg); |
150 |
| -} |
| 149 | + .carousel-control-prev-icon { |
| 150 | + background-image: escape-svg($carousel-control-prev-icon-bg); |
| 151 | + } |
151 | 152 |
|
152 |
| -.carousel-control-next-icon { |
153 |
| - background-image: escape-svg($carousel-control-next-icon-bg); |
154 |
| -} |
| 153 | + .carousel-control-next-icon { |
| 154 | + background-image: escape-svg($carousel-control-next-icon-bg); |
| 155 | + } |
155 | 156 |
|
156 |
| -// Optional indicator pips |
157 |
| -// Add an ordered list with the following class and add a list item for each |
158 |
| -// slide your carousel holds. |
159 |
| - |
160 |
| -.carousel-indicators { |
161 |
| - bottom: 0; |
162 |
| - display: flex; |
163 |
| - justify-content: center; |
164 |
| - left: 0; |
165 |
| - list-style: none; |
166 |
| - margin-left: $carousel-control-width; |
167 |
| - margin-right: $carousel-control-width; |
168 |
| - padding-left: 0; |
169 |
| - position: absolute; |
170 |
| - right: 0; |
171 |
| - z-index: 15; |
172 |
| - |
173 |
| - li { |
174 |
| - background-clip: padding-box; |
175 |
| - background-color: $carousel-indicator-active-bg; |
176 |
| - border-bottom: $carousel-indicator-hit-area-height solid transparent; |
177 |
| - border-top: $carousel-indicator-hit-area-height solid transparent; |
178 |
| - box-sizing: content-box; |
179 |
| - cursor: pointer; |
180 |
| - flex: 0 1 auto; |
181 |
| - height: $carousel-indicator-height; |
182 |
| - margin-left: $carousel-indicator-spacer; |
183 |
| - margin-right: $carousel-indicator-spacer; |
184 |
| - opacity: 0.5; |
185 |
| - text-indent: -999px; |
186 |
| - |
187 |
| - @include transition($carousel-indicator-transition); |
188 |
| - |
189 |
| - width: $carousel-indicator-width; |
190 |
| - } |
191 |
| - |
192 |
| - .active { |
193 |
| - opacity: 1; |
| 157 | + // Optional indicator pips |
| 158 | + // Add an ordered list with the following class and add a list item for each |
| 159 | + // slide your carousel holds. |
| 160 | + |
| 161 | + .carousel-indicators { |
| 162 | + bottom: 0; |
| 163 | + display: flex; |
| 164 | + justify-content: center; |
| 165 | + left: 0; |
| 166 | + list-style: none; |
| 167 | + margin-left: $carousel-control-width; |
| 168 | + margin-right: $carousel-control-width; |
| 169 | + padding-left: 0; |
| 170 | + position: absolute; |
| 171 | + right: 0; |
| 172 | + z-index: 15; |
| 173 | + |
| 174 | + li { |
| 175 | + background-clip: padding-box; |
| 176 | + background-color: $carousel-indicator-active-bg; |
| 177 | + border-bottom: $carousel-indicator-hit-area-height |
| 178 | + solid |
| 179 | + transparent; |
| 180 | + border-top: $carousel-indicator-hit-area-height solid transparent; |
| 181 | + box-sizing: content-box; |
| 182 | + cursor: pointer; |
| 183 | + flex: 0 1 auto; |
| 184 | + height: $carousel-indicator-height; |
| 185 | + margin-left: $carousel-indicator-spacer; |
| 186 | + margin-right: $carousel-indicator-spacer; |
| 187 | + opacity: 0.5; |
| 188 | + text-indent: -999px; |
| 189 | + |
| 190 | + @include transition($carousel-indicator-transition); |
| 191 | + |
| 192 | + width: $carousel-indicator-width; |
| 193 | + } |
| 194 | + |
| 195 | + .active { |
| 196 | + opacity: 1; |
| 197 | + } |
194 | 198 | }
|
195 |
| -} |
196 | 199 |
|
197 |
| -// Optional captions |
198 |
| - |
199 |
| -.carousel-caption { |
200 |
| - position: absolute; |
201 |
| - right: (100% - $carousel-caption-width) / 2; |
202 |
| - bottom: 20px; |
203 |
| - left: (100% - $carousel-caption-width) / 2; |
204 |
| - z-index: 10; |
205 |
| - padding-top: 20px; |
206 |
| - padding-bottom: 20px; |
207 |
| - color: $carousel-caption-color; |
208 |
| - text-align: center; |
| 200 | + // Optional captions |
| 201 | + |
| 202 | + .carousel-caption { |
| 203 | + position: absolute; |
| 204 | + right: (100% - $carousel-caption-width) / 2; |
| 205 | + bottom: 20px; |
| 206 | + left: (100% - $carousel-caption-width) / 2; |
| 207 | + z-index: 10; |
| 208 | + padding-top: 20px; |
| 209 | + padding-bottom: 20px; |
| 210 | + color: $carousel-caption-color; |
| 211 | + text-align: center; |
| 212 | + } |
209 | 213 | }
|
0 commit comments