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
// stylelint-disable selector-no-qualifying-type
-
 
2
 
-
 
3
// Make the div behave like a button
1
// Make the div behave like a button
4
.btn-group,
2
.btn-group,
5
.btn-group-vertical {
3
.btn-group-vertical {
6
  position: relative;
4
  position: relative;
7
  display: inline-flex;
5
  display: inline-flex;
8
  vertical-align: middle; // match .btn alignment given font-size hack above
6
  vertical-align: middle; // match .btn alignment given font-size hack above
Línea 9... Línea 7...
9
 
7
 
10
  > .btn {
8
  > .btn {
11
    position: relative;
9
    position: relative;
-
 
10
    flex: 1 1 auto;
Línea 12... Línea 11...
12
    flex: 1 1 auto;
11
  }
13
 
12
 
14
    // Bring the hover, focused, and "active" buttons to the front to overlay
13
  // Bring the hover, focused, and "active" buttons to the front to overlay
15
    // the borders properly
14
  // the borders properly
16
    @include hover() {
15
  > .btn-check:checked + .btn,
17
      z-index: 1;
16
  > .btn-check:focus + .btn,
18
    }
17
  > .btn:hover,
19
    &:focus,
18
  > .btn:focus,
20
    &:active,
19
  > .btn:active,
21
    &.active {
-
 
22
      z-index: 1;
20
  > .btn.active {
23
    }
21
    z-index: 1;
Línea 24... Línea 22...
24
  }
22
  }
25
}
23
}
Línea 34... Línea 32...
34
    width: auto;
32
    width: auto;
35
  }
33
  }
36
}
34
}
Línea 37... Línea 35...
37
 
35
 
-
 
36
.btn-group {
-
 
37
  @include border-radius($btn-border-radius);
38
.btn-group {
38
 
39
  // Prevent double borders when buttons are next to each other
39
  // Prevent double borders when buttons are next to each other
40
  > .btn:not(:first-child),
40
  > :not(.btn-check:first-child) + .btn,
41
  > .btn-group:not(:first-child) {
41
  > .btn-group:not(:first-child) {
42
    margin-left: -$btn-border-width;
42
    margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
Línea 43... Línea 43...
43
  }
43
  }
44
 
44
 
-
 
45
  // Reset rounded corners
45
  // Reset rounded corners
46
  > .btn:not(:last-child):not(.dropdown-toggle),
46
  > .btn:not(:last-child):not(.dropdown-toggle),
47
  > .btn.dropdown-toggle-split:first-child,
47
  > .btn-group:not(:last-child) > .btn {
48
  > .btn-group:not(:last-child) > .btn {
Línea -... Línea 49...
-
 
49
    @include border-end-radius(0);
-
 
50
  }
-
 
51
 
-
 
52
  // The left radius should be 0 if the button is:
48
    @include border-right-radius(0);
53
  // - the "third or more" child
-
 
54
  // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
49
  }
55
  // - part of a btn-group which isn't the first child
50
 
56
  > .btn:nth-child(n + 3),
51
  > .btn:not(:first-child),
57
  > :not(.btn-check) + .btn,
52
  > .btn-group:not(:first-child) > .btn {
58
  > .btn-group:not(:first-child) > .btn {
Línea 53... Línea 59...
53
    @include border-left-radius(0);
59
    @include border-start-radius(0);
54
  }
60
  }
Línea 70... Línea 76...
70
  padding-right: $btn-padding-x * .75;
76
  padding-right: $btn-padding-x * .75;
71
  padding-left: $btn-padding-x * .75;
77
  padding-left: $btn-padding-x * .75;
Línea 72... Línea 78...
72
 
78
 
73
  &::after,
79
  &::after,
74
  .dropup &::after,
80
  .dropup &::after,
75
  .dropright &::after {
81
  .dropend &::after {
76
    margin-left: 0;
82
    margin-left: 0;
Línea 77... Línea 83...
77
  }
83
  }
78
 
84
 
79
  .dropleft &::before {
85
  .dropstart &::before {
80
    margin-right: 0;
86
    margin-right: 0;
Línea 81... Línea 87...
81
  }
87
  }
Línea 118... Línea 124...
118
    width: 100%;
124
    width: 100%;
119
  }
125
  }
Línea 120... Línea 126...
120
 
126
 
121
  > .btn:not(:first-child),
127
  > .btn:not(:first-child),
122
  > .btn-group:not(:first-child) {
128
  > .btn-group:not(:first-child) {
123
    margin-top: -$btn-border-width;
129
    margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
Línea 124... Línea 130...
124
  }
130
  }
125
 
131
 
126
  // Reset rounded corners
132
  // Reset rounded corners
127
  > .btn:not(:last-child):not(.dropdown-toggle),
133
  > .btn:not(:last-child):not(.dropdown-toggle),
128
  > .btn-group:not(:last-child) > .btn {
134
  > .btn-group:not(:last-child) > .btn {
Línea 129... Línea 135...
129
    @include border-bottom-radius(0);
135
    @include border-bottom-radius(0);
130
  }
136
  }
131
 
137
 
132
  > .btn:not(:first-child),
138
  > .btn ~ .btn,
133
  > .btn-group:not(:first-child) > .btn {
139
  > .btn-group:not(:first-child) > .btn {
134
    @include border-top-radius(0);
-
 
135
  }
-
 
136
}
-
 
137
 
-
 
138
 
-
 
139
// Checkbox and radio options
-
 
140
//
-
 
141
// In order to support the browser's form validation feedback, powered by the
-
 
142
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
-
 
143
// `display: none;` or `visibility: hidden;` as that also hides the popover.
-
 
144
// Simply visually hiding the inputs via `opacity` would leave them clickable in
-
 
145
// certain cases which is prevented by using `clip` and `pointer-events`.
-
 
146
// This way, we ensure a DOM element is visible to position the popover from.
-
 
147
//
-
 
148
// See https://github.com/twbs/bootstrap/pull/12794 and
-
 
149
// https://github.com/twbs/bootstrap/pull/14559 for more information.
-
 
150
 
-
 
151
.btn-group-toggle {
-
 
152
  > .btn,
-
 
153
  > .btn-group > .btn {
-
 
154
    margin-bottom: 0; // Override default `<label>` value
-
 
155
 
-
 
156
    input[type="radio"],
-
 
157
    input[type="checkbox"] {
-
 
158
      position: absolute;
-
 
159
      clip: rect(0, 0, 0, 0);
-
 
160
      pointer-events: none;
-