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
// The dropdown wrapper (`<div>`)
1
// The dropdown wrapper (`<div>`)
2
.dropup,
2
.dropup,
3
.dropright,
3
.dropend,
4
.dropdown,
4
.dropdown,
5
.dropleft {
5
.dropstart,
-
 
6
.dropup-center,
-
 
7
.dropdown-center {
6
  position: relative;
8
  position: relative;
7
}
9
}
Línea 8... Línea 10...
8
 
10
 
9
.dropdown-toggle {
11
.dropdown-toggle {
Línea 13... Línea 15...
13
  @include caret();
15
  @include caret();
14
}
16
}
Línea 15... Línea 17...
15
 
17
 
16
// The dropdown menu
18
// The dropdown menu
-
 
19
.dropdown-menu {
-
 
20
  // scss-docs-start dropdown-css-vars
-
 
21
  --#{$prefix}dropdown-zindex: #{$zindex-dropdown};
-
 
22
  --#{$prefix}dropdown-min-width: #{$dropdown-min-width};
-
 
23
  --#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
-
 
24
  --#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
-
 
25
  --#{$prefix}dropdown-spacer: #{$dropdown-spacer};
-
 
26
  @include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
-
 
27
  --#{$prefix}dropdown-color: #{$dropdown-color};
-
 
28
  --#{$prefix}dropdown-bg: #{$dropdown-bg};
-
 
29
  --#{$prefix}dropdown-border-color: #{$dropdown-border-color};
-
 
30
  --#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
-
 
31
  --#{$prefix}dropdown-border-width: #{$dropdown-border-width};
-
 
32
  --#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
-
 
33
  --#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
-
 
34
  --#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
-
 
35
  --#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
-
 
36
  --#{$prefix}dropdown-link-color: #{$dropdown-link-color};
-
 
37
  --#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
-
 
38
  --#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
-
 
39
  --#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
-
 
40
  --#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
-
 
41
  --#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
-
 
42
  --#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
-
 
43
  --#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
-
 
44
  --#{$prefix}dropdown-header-color: #{$dropdown-header-color};
-
 
45
  --#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
-
 
46
  --#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
-
 
47
  // scss-docs-end dropdown-css-vars
17
.dropdown-menu {
48
 
18
  position: absolute;
-
 
19
  top: 100%;
-
 
20
  left: 0;
49
  position: absolute;
21
  z-index: $zindex-dropdown;
50
  z-index: var(--#{$prefix}dropdown-zindex);
22
  display: none; // none by default, but block on "open" of the menu
-
 
23
  float: left;
51
  display: none; // none by default, but block on "open" of the menu
24
  min-width: $dropdown-min-width;
52
  min-width: var(--#{$prefix}dropdown-min-width);
25
  padding: $dropdown-padding-y $dropdown-padding-x;
53
  padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
26
  margin: $dropdown-spacer 0 0; // override default ul
54
  margin: 0; // Override default margin of ul
27
  @include font-size($dropdown-font-size);
55
  @include font-size(var(--#{$prefix}dropdown-font-size));
28
  color: $dropdown-color;
56
  color: var(--#{$prefix}dropdown-color);
29
  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
57
  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
30
  list-style: none;
58
  list-style: none;
31
  background-color: $dropdown-bg;
59
  background-color: var(--#{$prefix}dropdown-bg);
32
  background-clip: padding-box;
60
  background-clip: padding-box;
33
  border: $dropdown-border-width solid $dropdown-border-color;
61
  border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
34
  @include border-radius($dropdown-border-radius);
62
  @include border-radius(var(--#{$prefix}dropdown-border-radius));
-
 
63
  @include box-shadow(var(--#{$prefix}dropdown-box-shadow));
-
 
64
 
-
 
65
  &[data-bs-popper] {
-
 
66
    top: 100%;
-
 
67
    left: 0;
-
 
68
    margin-top: var(--#{$prefix}dropdown-spacer);
-
 
69
  }
-
 
70
 
-
 
71
  @if $dropdown-padding-y == 0 {
-
 
72
    > .dropdown-item:first-child,
-
 
73
    > li:first-child .dropdown-item {
-
 
74
      @include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
-
 
75
    }
-
 
76
    > .dropdown-item:last-child,
-
 
77
    > li:last-child .dropdown-item {
-
 
78
      @include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
-
 
79
    }
-
 
80
 
35
  @include box-shadow($dropdown-box-shadow);
81
  }
Línea -... Línea 82...
-
 
82
}
-
 
83
 
-
 
84
// scss-docs-start responsive-breakpoints
-
 
85
// We deliberately hardcode the `bs-` prefix because we check
36
}
86
// this custom property in JS to determine Popper's positioning
37
 
87
 
38
@each $breakpoint in map-keys($grid-breakpoints) {
88
@each $breakpoint in map-keys($grid-breakpoints) {
Línea 39... Línea 89...
39
  @include media-breakpoint-up($breakpoint) {
89
  @include media-breakpoint-up($breakpoint) {
-
 
90
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
 
91
 
-
 
92
    .dropdown-menu#{$infix}-start {
40
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
93
      --bs-position: start;
41
 
94
 
-
 
95
      &[data-bs-popper] {
42
    .dropdown-menu#{$infix}-left {
96
        right: auto;
Línea 43... Línea 97...
43
      right: auto;
97
        left: 0;
-
 
98
      }
-
 
99
    }
-
 
100
 
44
      left: 0;
101
    .dropdown-menu#{$infix}-end {
45
    }
102
      --bs-position: end;
-
 
103
 
46
 
104
      &[data-bs-popper] {
47
    .dropdown-menu#{$infix}-right {
105
        right: 0;
48
      right: 0;
106
        left: auto;
-
 
107
      }
Línea 49... Línea 108...
49
      left: auto;
108
    }
50
    }
109
  }
51
  }
110
}
52
}
111
// scss-docs-end responsive-breakpoints
53
 
112
 
54
// Allow for dropdowns to go bottom up (aka, dropup-menu)
113
// Allow for dropdowns to go bottom up (aka, dropup-menu)
55
// Just add .dropup after the standard .dropdown class and you're set.
114
// Just add .dropup after the standard .dropdown class and you're set.
56
.dropup {
115
.dropup {
57
  .dropdown-menu {
116
  .dropdown-menu[data-bs-popper] {
Línea 58... Línea 117...
58
    top: auto;
117
    top: auto;
59
    bottom: 100%;
118
    bottom: 100%;
60
    margin-top: 0;
119
    margin-top: 0;
61
    margin-bottom: $dropdown-spacer;
120
    margin-bottom: var(--#{$prefix}dropdown-spacer);
Línea 62... Línea 121...
62
  }
121
  }
63
 
122
 
64
  .dropdown-toggle {
123
  .dropdown-toggle {
65
    @include caret(up);
124
    @include caret(up);
66
  }
125
  }
67
}
126
}
68
 
127
 
69
.dropright {
128
.dropend {
Línea 70... Línea 129...
70
  .dropdown-menu {
129
  .dropdown-menu[data-bs-popper] {
71
    top: 0;
130
    top: 0;
72
    right: auto;
131
    right: auto;
73
    left: 100%;
132
    left: 100%;
74
    margin-top: 0;
133
    margin-top: 0;
75
    margin-left: $dropdown-spacer;
134
    margin-left: var(--#{$prefix}dropdown-spacer);
76
  }
135
  }
Línea 77... Línea 136...
77
 
136
 
78
  .dropdown-toggle {
137
  .dropdown-toggle {
79
    @include caret(right);
138
    @include caret(end);
80
    &::after {
139
    &::after {
81
      vertical-align: 0;
140
      vertical-align: 0;
82
    }
141
    }
83
  }
142
  }
84
}
143
}
Línea 85... Línea 144...
85
 
144
 
86
.dropleft {
145
.dropstart {
87
  .dropdown-menu {
146
  .dropdown-menu[data-bs-popper] {
88
    top: 0;
147
    top: 0;
89
    right: 100%;
148
    right: 100%;
90
    left: auto;
149
    left: auto;
91
    margin-top: 0;
150
    margin-top: 0;
Línea 92... Línea -...
92
    margin-right: $dropdown-spacer;
-
 
93
  }
-
 
94
 
-
 
95
  .dropdown-toggle {
-
 
96
    @include caret(left);
-
 
97
    &::before {
-
 
98
      vertical-align: 0;
-
 
99
    }
-
 
100
  }
-
 
101
}
-
 
102
 
-
 
Línea 103... Línea 151...
103
// When Popper is enabled, reset the basic dropdown position
151
    margin-right: var(--#{$prefix}dropdown-spacer);
104
// stylelint-disable-next-line no-duplicate-selectors
152
  }
-
 
153
 
105
.dropdown-menu {
154
  .dropdown-toggle {
-
 
155
    @include caret(start);
-
 
156
    &::before {
-
 
157
      vertical-align: 0;
106
  &[x-placement^="top"],
158
    }
Línea 107... Línea 159...
107
  &[x-placement^="right"],
159
  }
108
  &[x-placement^="bottom"],
160
}
109
  &[x-placement^="left"] {
161
 
110
    right: auto;
162
 
111
    bottom: auto;
163
// Dividers (basically an `<hr>`) within the dropdown
112
  }
164
.dropdown-divider {
113
}
165
  height: 0;
114
 
166
  margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
115
// Dividers (basically an `<hr>`) within the dropdown
167
  overflow: hidden;
116
.dropdown-divider {
168
  border-top: 1px solid var(--#{$prefix}dropdown-divider-bg);
117
  @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
169
  opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
118
}
170
}
119
 
171
 
120
// Links, buttons, and more within the dropdown menu
172
// Links, buttons, and more within the dropdown menu
121
//
173
//
-
 
174
// `<button>`-specific styles are denoted with `// For <button>s`
Línea 122... Línea -...
122
// `<button>`-specific styles are denoted with `// For <button>s`
-
 
123
.dropdown-item {
-
 
124
  display: block;
-
 
125
  width: 100%; // For `<button>`s
-
 
126
  padding: $dropdown-item-padding-y $dropdown-item-padding-x;
-
 
127
  clear: both;
175
.dropdown-item {
128
  font-weight: $font-weight-normal;
-
 
129
  color: $dropdown-link-color;
176
  display: block;
130
  text-align: inherit; // For `<button>`s
-
 
131
  text-decoration: if($link-decoration == none, null, none);
-
 
132
  white-space: nowrap; // prevent links from randomly breaking onto new lines
-
 
133
  background-color: transparent; // For `<button>`s
-
 
134
  border: 0; // For `<button>`s
-
 
135
 
177
  width: 100%; // For `<button>`s
136
  // Prevent dropdown overflow if there's no padding
178
  padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
137
  // See https://github.com/twbs/bootstrap/pull/27703
179
  clear: both;
138
  @if $dropdown-padding-y == 0 {
180
  font-weight: $font-weight-normal;
Línea 139... Línea 181...
139
    &:first-child {
181
  color: var(--#{$prefix}dropdown-link-color);
140
      @include border-top-radius($dropdown-inner-border-radius);
182
  text-align: inherit; // For `<button>`s
141
    }
183
  text-decoration: if($link-decoration == none, null, none);
142
 
184
  white-space: nowrap; // prevent links from randomly breaking onto new lines
143
    &:last-child {
185
  background-color: transparent; // For `<button>`s
144
      @include border-bottom-radius($dropdown-inner-border-radius);
186
  border: 0; // For `<button>`s
Línea 145... Línea 187...
145
    }
187
  @include border-radius(var(--#{$prefix}dropdown-item-border-radius, 0));
146
  }
188
 
147
 
189
  &:hover,
148
  @include hover-focus() {
190
  &:focus {
149
    color: $dropdown-link-hover-color;
191
    color: var(--#{$prefix}dropdown-link-hover-color);
150
    text-decoration: none;
192
    text-decoration: if($link-hover-decoration == underline, none, null);
151
    @include gradient-bg($dropdown-link-hover-bg);
-
 
152
  }
193
    @include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
153
 
-
 
154
  &.active,
194
  }
155
  &:active {
195
 
Línea 156... Línea 196...
156
    color: $dropdown-link-active-color;
196
  &.active,
157
    text-decoration: none;
197
  &:active {
158
    @include gradient-bg($dropdown-link-active-bg);
198
    color: var(--#{$prefix}dropdown-link-active-color);
Línea 159... Línea 199...
159
  }
199
    text-decoration: none;
160
 
200
    @include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
161
  &.disabled,
201
  }
162
  &:disabled {
202
 
163
    color: $dropdown-link-disabled-color;
203
  &.disabled,
164
    pointer-events: none;
204
  &:disabled {
165
    background-color: transparent;
205
    color: var(--#{$prefix}dropdown-link-disabled-color);
166
    // Remove CSS gradients if they're enabled
206
    pointer-events: none;
167
    @if $enable-gradients {
207
    background-color: transparent;
Línea 168... Línea 208...
168
      background-image: none;
208
    // Remove CSS gradients if they're enabled
169
    }
209
    background-image: if($enable-gradients, none, null);
170
  }
210
  }
171
}
211
}
172
 
212
 
-
 
213
.dropdown-menu.show {
-
 
214
  display: block;
-
 
215
}
-
 
216
 
-
 
217
// Dropdown section headers
-
 
218
.dropdown-header {
-
 
219
  display: block;
-
 
220
  padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
-
 
221
  margin-bottom: 0; // for use with heading elements
-
 
222
  @include font-size($font-size-sm);
-
 
223
  color: var(--#{$prefix}dropdown-header-color);
-
 
224
  white-space: nowrap; // as with > li > a
-
 
225
}
-
 
226
 
-
 
227
// Dropdown text
-
 
228
.dropdown-item-text {
-
 
229
  display: block;
-
 
230
  padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
173
.dropdown-menu.show {
231
  color: var(--#{$prefix}dropdown-link-color);