Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
// Notes on the classes:
1
// Notes on the classes:
2
//
2
//
3
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
3
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
4
//    even when their scroll action started on a carousel, but for compatibility (with Firefox)
4
//    even when their scroll action started on a carousel, but for compatibility (with Firefox)
5
//    we're preventing all actions instead
5
//    we're preventing all actions instead
6
// 2. The .carousel-item-left and .carousel-item-right is used to indicate where
6
// 2. The .carousel-item-start and .carousel-item-end is used to indicate where
7
//    the active slide is heading.
7
//    the active slide is heading.
8
// 3. .active.carousel-item is the current slide.
8
// 3. .active.carousel-item is the current slide.
9
// 4. .active.carousel-item-left and .active.carousel-item-right is the current
9
// 4. .active.carousel-item-start and .active.carousel-item-end is the current
10
//    slide in its in-transition state. Only one of these occurs at a time.
10
//    slide in its in-transition state. Only one of these occurs at a time.
11
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
11
// 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
12
//    is the upcoming slide in transition.
12
//    is the upcoming slide in transition.
Línea 13... Línea 13...
13
 
13
 
14
.carousel {
14
.carousel {
15
  position: relative;
15
  position: relative;
Línea 40... Línea 40...
40
.carousel-item-next,
40
.carousel-item-next,
41
.carousel-item-prev {
41
.carousel-item-prev {
42
  display: block;
42
  display: block;
43
}
43
}
Línea 44... Línea 44...
44
 
44
 
45
.carousel-item-next:not(.carousel-item-left),
45
.carousel-item-next:not(.carousel-item-start),
46
.active.carousel-item-right {
46
.active.carousel-item-end {
47
  transform: translateX(100%);
47
  transform: translateX(100%);
Línea 48... Línea 48...
48
}
48
}
49
 
49
 
50
.carousel-item-prev:not(.carousel-item-right),
50
.carousel-item-prev:not(.carousel-item-end),
51
.active.carousel-item-left {
51
.active.carousel-item-start {
Línea 52... Línea 52...
52
  transform: translateX(-100%);
52
  transform: translateX(-100%);
Línea 63... Línea 63...
63
    transition-property: opacity;
63
    transition-property: opacity;
64
    transform: none;
64
    transform: none;
65
  }
65
  }
Línea 66... Línea 66...
66
 
66
 
67
  .carousel-item.active,
67
  .carousel-item.active,
68
  .carousel-item-next.carousel-item-left,
68
  .carousel-item-next.carousel-item-start,
69
  .carousel-item-prev.carousel-item-right {
69
  .carousel-item-prev.carousel-item-end {
70
    z-index: 1;
70
    z-index: 1;
71
    opacity: 1;
71
    opacity: 1;
Línea 72... Línea 72...
72
  }
72
  }
73
 
73
 
74
  .active.carousel-item-left,
74
  .active.carousel-item-start,
75
  .active.carousel-item-right {
75
  .active.carousel-item-end {
76
    z-index: 0;
76
    z-index: 0;
77
    opacity: 0;
77
    opacity: 0;
78
    @include transition(opacity 0s $carousel-transition-duration);
78
    @include transition(opacity 0s $carousel-transition-duration);
Línea 102... Línea 102...
102
  border: 0;
102
  border: 0;
103
  opacity: $carousel-control-opacity;
103
  opacity: $carousel-control-opacity;
104
  @include transition($carousel-control-transition);
104
  @include transition($carousel-control-transition);
Línea 105... Línea 105...
105
 
105
 
-
 
106
  // Hover/focus state
106
  // Hover/focus state
107
  &:hover,
107
  @include hover-focus() {
108
  &:focus {
108
    color: $carousel-control-color;
109
    color: $carousel-control-color;
109
    text-decoration: none;
110
    text-decoration: none;
110
    outline: 0;
111
    outline: 0;
111
    opacity: $carousel-control-hover-opacity;
112
    opacity: $carousel-control-hover-opacity;
112
  }
113
  }
113
}
114
}
114
.carousel-control-prev {
115
.carousel-control-prev {
115
  left: 0;
-
 
116
  @if $enable-gradients {
116
  left: 0;
117
    background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
-
 
118
  }
117
  background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
119
}
118
}
120
.carousel-control-next {
119
.carousel-control-next {
121
  right: 0;
-
 
122
  @if $enable-gradients {
120
  right: 0;
123
    background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
-
 
124
  }
121
  background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
Línea 125... Línea 122...
125
}
122
}
126
 
123
 
127
// Icons for within
124
// Icons for within
128
.carousel-control-prev-icon,
125
.carousel-control-prev-icon,
129
.carousel-control-next-icon {
126
.carousel-control-next-icon {
130
  display: inline-block;
127
  display: inline-block;
131
  width: $carousel-control-icon-width;
128
  width: $carousel-control-icon-width;
-
 
129
  height: $carousel-control-icon-width;
-
 
130
  background-repeat: no-repeat;
132
  height: $carousel-control-icon-width;
131
  background-position: 50%;
-
 
132
  background-size: 100% 100%;
133
  background: 50% / 100% 100% no-repeat;
133
}
134
}
134
 
135
.carousel-control-prev-icon {
135
.carousel-control-prev-icon {
136
  background-image: escape-svg($carousel-control-prev-icon-bg);
136
  background-image: escape-svg($carousel-control-prev-icon-bg) #{"/*rtl:" + escape-svg($carousel-control-next-icon-bg) + "*/"};
137
}
137
}
138
.carousel-control-next-icon {
138
.carousel-control-next-icon {
Línea 139... Línea -...
139
  background-image: escape-svg($carousel-control-next-icon-bg);
-
 
140
}
139
  background-image: escape-svg($carousel-control-next-icon-bg) #{"/*rtl:" + escape-svg($carousel-control-prev-icon-bg) + "*/"};
141
 
140
}
142
 
141
 
143
// Optional indicator pips
142
// Optional indicator pips/controls
Línea 144... Línea 143...
144
//
143
//
145
// Add an ordered list with the following class and add a list item for each
144
// Add a container (such as a list) with the following class and add an item (ideally a focusable control,
146
// slide your carousel holds.
145
// like a button) with data-bs-target for each slide your carousel holds.
147
 
146
 
148
.carousel-indicators {
147
.carousel-indicators {
149
  position: absolute;
148
  position: absolute;
150
  right: 0;
149
  right: 0;
151
  bottom: 0;
150
  bottom: 0;
152
  left: 0;
151
  left: 0;
153
  z-index: 15;
152
  z-index: 2;
154
  display: flex;
153
  display: flex;
-
 
154
  justify-content: center;
155
  justify-content: center;
155
  padding: 0;
156
  padding-left: 0; // override <ol> default
-
 
Línea 157... Línea 156...
157
  // Use the .carousel-control's width as margin so we don't overlay those
156
  // Use the .carousel-control's width as margin so we don't overlay those
158
  margin-right: $carousel-control-width;
157
  margin-right: $carousel-control-width;
159
  margin-left: $carousel-control-width;
158
  margin-bottom: 1rem;
160
  list-style: none;
159
  margin-left: $carousel-control-width;
161
 
160
 
-
 
161
  [data-bs-target] {
162
  li {
162
    box-sizing: content-box;
163
    box-sizing: content-box;
163
    flex: 0 1 auto;
164
    flex: 0 1 auto;
164
    width: $carousel-indicator-width;
165
    width: $carousel-indicator-width;
165
    height: $carousel-indicator-height;
166
    height: $carousel-indicator-height;
166
    padding: 0;
167
    margin-right: $carousel-indicator-spacer;
167
    margin-right: $carousel-indicator-spacer;
-
 
168
    margin-left: $carousel-indicator-spacer;
168
    margin-left: $carousel-indicator-spacer;
169
    text-indent: -999px;
169
    text-indent: -999px;
170
    cursor: pointer;
170
    cursor: pointer;
171
    background-color: $carousel-indicator-active-bg;
171
    background-color: $carousel-indicator-active-bg;
172
    background-clip: padding-box;
172
    background-clip: padding-box;
173
    border: 0;
173
    // Use transparent borders to increase the hit area by 10px on top and bottom.
174
    // Use transparent borders to increase the hit area by 10px on top and bottom.
Línea 174... Línea 175...
174
    border-top: $carousel-indicator-hit-area-height solid transparent;
175
    border-top: $carousel-indicator-hit-area-height solid transparent;
175
    border-bottom: $carousel-indicator-hit-area-height solid transparent;
176
    border-bottom: $carousel-indicator-hit-area-height solid transparent;
176
    opacity: .5;
177
    opacity: $carousel-indicator-opacity;
177
    @include transition($carousel-indicator-transition);
178
    @include transition($carousel-indicator-transition);
Línea 178... Línea 179...
178
  }
179
  }
Línea 188... Línea 189...
188
//
189
//
Línea 189... Línea 190...
189
 
190
 
190
.carousel-caption {
191
.carousel-caption {
191
  position: absolute;
192
  position: absolute;
192
  right: (100% - $carousel-caption-width) * .5;
193
  right: (100% - $carousel-caption-width) * .5;
193
  bottom: 20px;
194
  bottom: $carousel-caption-spacer;
194
  left: (100% - $carousel-caption-width) * .5;
-
 
195
  z-index: 10;
195
  left: (100% - $carousel-caption-width) * .5;
196
  padding-top: 20px;
196
  padding-top: $carousel-caption-padding-y;
197
  padding-bottom: 20px;
197
  padding-bottom: $carousel-caption-padding-y;
198
  color: $carousel-caption-color;
198
  color: $carousel-caption-color;
199
  text-align: center;
199
  text-align: center;
-
 
200
}
-
 
201
 
-
 
202
// Dark mode carousel
-
 
203
 
-
 
204
@mixin carousel-dark() {
-
 
205
  .carousel-control-prev-icon,
-
 
206
  .carousel-control-next-icon {
-
 
207
    filter: $carousel-dark-control-icon-filter;
-
 
208
  }
-
 
209
 
-
 
210
  .carousel-indicators [data-bs-target] {
-
 
211
    background-color: $carousel-dark-indicator-active-bg;
-
 
212
  }
-
 
213
 
-
 
214
  .carousel-caption {
-
 
215
    color: $carousel-dark-caption-color;
-
 
216
  }
-
 
217
}
-
 
218
 
-
 
219
.carousel-dark {
-
 
220
  @include carousel-dark();
-
 
221
}
-
 
222
 
-
 
223
@if $enable-dark-mode {
-
 
224
  @include color-mode(dark) {
-
 
225
    @if $color-mode-type == "media-query" {
-
 
226
      .carousel {
-
 
227
        @include carousel-dark();
-
 
228
      }
-
 
229
    } @else {
-
 
230
      .carousel,
-
 
231
      &.carousel {
-
 
232
        @include carousel-dark();
-
 
233
      }
-
 
234
    }
-
 
235
  }