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
// Base class
1
// Base class
2
//
2
//
3
// Easily usable on <ul>, <ol>, or <div>.
3
// Easily usable on <ul>, <ol>, or <div>.
Línea 4... Línea 4...
4
 
4
 
-
 
5
.list-group {
-
 
6
  // scss-docs-start list-group-css-vars
-
 
7
  --#{$prefix}list-group-color: #{$list-group-color};
-
 
8
  --#{$prefix}list-group-bg: #{$list-group-bg};
-
 
9
  --#{$prefix}list-group-border-color: #{$list-group-border-color};
-
 
10
  --#{$prefix}list-group-border-width: #{$list-group-border-width};
-
 
11
  --#{$prefix}list-group-border-radius: #{$list-group-border-radius};
-
 
12
  --#{$prefix}list-group-item-padding-x: #{$list-group-item-padding-x};
-
 
13
  --#{$prefix}list-group-item-padding-y: #{$list-group-item-padding-y};
-
 
14
  --#{$prefix}list-group-action-color: #{$list-group-action-color};
-
 
15
  --#{$prefix}list-group-action-hover-color: #{$list-group-action-hover-color};
-
 
16
  --#{$prefix}list-group-action-hover-bg: #{$list-group-hover-bg};
-
 
17
  --#{$prefix}list-group-action-active-color: #{$list-group-action-active-color};
-
 
18
  --#{$prefix}list-group-action-active-bg: #{$list-group-action-active-bg};
-
 
19
  --#{$prefix}list-group-disabled-color: #{$list-group-disabled-color};
-
 
20
  --#{$prefix}list-group-disabled-bg: #{$list-group-disabled-bg};
-
 
21
  --#{$prefix}list-group-active-color: #{$list-group-active-color};
-
 
22
  --#{$prefix}list-group-active-bg: #{$list-group-active-bg};
-
 
23
  --#{$prefix}list-group-active-border-color: #{$list-group-active-border-color};
-
 
24
  // scss-docs-end list-group-css-vars
5
.list-group {
25
 
6
  display: flex;
26
  display: flex;
Línea 7... Línea 27...
7
  flex-direction: column;
27
  flex-direction: column;
8
 
28
 
9
  // No need to set list-style: none; since .list-group-item is block level
29
  // No need to set list-style: none; since .list-group-item is block level
10
  padding-left: 0; // reset padding because ul and ol
30
  padding-left: 0; // reset padding because ul and ol
11
  margin-bottom: 0;
31
  margin-bottom: 0;
Línea -... Línea 32...
-
 
32
  @include border-radius(var(--#{$prefix}list-group-border-radius));
-
 
33
}
-
 
34
 
-
 
35
.list-group-numbered {
-
 
36
  list-style-type: none;
-
 
37
  counter-reset: section;
-
 
38
 
-
 
39
  > .list-group-item::before {
-
 
40
    // Increments only this instance of the section counter
-
 
41
    content: counters(section, ".") ". ";
Línea 12... Línea 42...
12
  @include border-radius($list-group-border-radius);
42
    counter-increment: section;
13
}
43
  }
14
 
44
}
15
 
45
 
Línea 16... Línea 46...
16
// Interactive list items
46
// Interactive list items
17
//
47
//
18
// Use anchor or button elements instead of `li`s or `div`s to create interactive
48
// Use anchor or button elements instead of `li`s or `div`s to create interactive
19
// list items. Includes an extra `.active` modifier class for selected items.
49
// list items. Includes an extra `.active` modifier class for selected items.
Línea 20... Línea 50...
20
 
50
 
-
 
51
.list-group-item-action {
21
.list-group-item-action {
52
  width: 100%; // For `<button>`s (anchors become 100% by default though)
22
  width: 100%; // For `<button>`s (anchors become 100% by default though)
53
  color: var(--#{$prefix}list-group-action-color);
23
  color: $list-group-action-color;
54
  text-align: inherit; // For `<button>`s (anchors inherit)
24
  text-align: inherit; // For `<button>`s (anchors inherit)
55
 
25
 
56
  // Hover state
26
  // Hover state
57
  &:hover,
Línea 27... Línea 58...
27
  @include hover-focus() {
58
  &:focus {
28
    z-index: 1; // Place hover/focus items above their siblings for proper border styling
59
    z-index: 1; // Place hover/focus items above their siblings for proper border styling
29
    color: $list-group-action-hover-color;
60
    color: var(--#{$prefix}list-group-action-hover-color);
30
    text-decoration: none;
61
    text-decoration: none;
31
    background-color: $list-group-hover-bg;
62
    background-color: var(--#{$prefix}list-group-action-hover-bg);
Línea 32... Línea -...
32
  }
-
 
33
 
63
  }
34
  &:active {
64
 
35
    color: $list-group-action-active-color;
65
  &:active {
Línea 36... Línea 66...
36
    background-color: $list-group-action-active-bg;
66
    color: var(--#{$prefix}list-group-action-active-color);
37
  }
67
    background-color: var(--#{$prefix}list-group-action-active-bg);
38
}
68
  }
39
 
69
}
40
 
70
 
41
// Individual list items
71
// Individual list items
42
//
72
//
43
// Use on `li`s or `div`s within the `.list-group` parent.
73
// Use on `li`s or `div`s within the `.list-group` parent.
Línea 44... Línea 74...
44
 
74
 
45
.list-group-item {
75
.list-group-item {
46
  position: relative;
76
  position: relative;
Línea 59... Línea 89...
59
    @include border-bottom-radius(inherit);
89
    @include border-bottom-radius(inherit);
60
  }
90
  }
Línea 61... Línea 91...
61
 
91
 
62
  &.disabled,
92
  &.disabled,
63
  &:disabled {
93
  &:disabled {
64
    color: $list-group-disabled-color;
94
    color: var(--#{$prefix}list-group-disabled-color);
65
    pointer-events: none;
95
    pointer-events: none;
66
    background-color: $list-group-disabled-bg;
96
    background-color: var(--#{$prefix}list-group-disabled-bg);
Línea 67... Línea 97...
67
  }
97
  }
68
 
98
 
69
  // Include both here for `<a>`s and `<button>`s
99
  // Include both here for `<a>`s and `<button>`s
70
  &.active {
100
  &.active {
71
    z-index: 2; // Place active items above their siblings for proper border styling
101
    z-index: 2; // Place active items above their siblings for proper border styling
72
    color: $list-group-active-color;
102
    color: var(--#{$prefix}list-group-active-color);
73
    background-color: $list-group-active-bg;
103
    background-color: var(--#{$prefix}list-group-active-bg);
Línea -... Línea 104...
-
 
104
    border-color: var(--#{$prefix}list-group-active-border-color);
74
    border-color: $list-group-active-border-color;
105
  }
75
  }
106
 
Línea 76... Línea 107...
76
 
107
  // stylelint-disable-next-line scss/selector-no-redundant-nesting-selector
77
  & + & {
108
  & + .list-group-item {
78
    border-top-width: 0;
109
    border-top-width: 0;
79
 
110
 
80
    &.active {
111
    &.active {
81
      margin-top: -$list-group-border-width;
112
      margin-top: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
Línea 82... Línea -...
82
      border-top-width: $list-group-border-width;
-
 
83
    }
113
      border-top-width: var(--#{$prefix}list-group-border-width);
84
  }
114
    }
85
}
115
  }
Línea 86... Línea 116...
86
 
116
}
Línea 95... Línea 125...
95
 
125
 
96
    .list-group-horizontal#{$infix} {
126
    .list-group-horizontal#{$infix} {
Línea 97... Línea 127...
97
      flex-direction: row;
127
      flex-direction: row;
98
 
128
 
99
      > .list-group-item {
129
      > .list-group-item {
100
        &:first-child {
130
        &:first-child:not(:last-child) {
101
          @include border-bottom-left-radius($list-group-border-radius);
131
          @include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
Línea 102... Línea 132...
102
          @include border-top-right-radius(0);
132
          @include border-top-end-radius(0);
103
        }
133
        }
104
 
134
 
105
        &:last-child {
135
        &:last-child:not(:first-child) {
Línea 106... Línea 136...
106
          @include border-top-right-radius($list-group-border-radius);
136
          @include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
107
          @include border-bottom-left-radius(0);
137
          @include border-bottom-start-radius(0);
108
        }
138
        }
Línea 109... Línea 139...
109
 
139
 
110
        &.active {
140
        &.active {
111
          margin-top: 0;
141
          margin-top: 0;
Línea 112... Línea 142...
112
        }
142
        }
113
 
143
 
114
        + .list-group-item {
144
        + .list-group-item {
115
          border-top-width: $list-group-border-width;
145
          border-top-width: var(--#{$prefix}list-group-border-width);
116
          border-left-width: 0;
146
          border-left-width: 0;
117
 
147
 
118
          &.active {
148
          &.active {
119
            margin-left: -$list-group-border-width;
149
            margin-left: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
Línea 133... Línea 163...
133
 
163
 
134
.list-group-flush {
164
.list-group-flush {
Línea 135... Línea 165...
135
  @include border-radius(0);
165
  @include border-radius(0);
136
 
166
 
Línea 137... Línea 167...
137
  > .list-group-item {
167
  > .list-group-item {
138
    border-width: 0 0 $list-group-border-width;
168
    border-width: 0 0 var(--#{$prefix}list-group-border-width);
139
 
169
 
140
    &:last-child {
170
    &:last-child {
141
      border-bottom-width: 0;
171
      border-bottom-width: 0;
Línea -... Línea 172...
-
 
172
    }
142
    }
173
  }
143
  }
174
}
144
}
175
 
145
 
176
 
Línea 146... Línea 177...
146
 
177
// scss-docs-start list-group-modifiers
-
 
178
// List group contextual variants
-
 
179
//
-
 
180
// Add modifier classes to change text and background color on individual items.
-
 
181
// Organizationally, this must come after the `:hover` states.
-
 
182
 
-
 
183
@each $state in map-keys($theme-colors) {
147
// Contextual variants
184
  .list-group-item-#{$state} {
-
 
185
    --#{$prefix}list-group-color: var(--#{$prefix}#{$state}-text-emphasis);
-
 
186
    --#{$prefix}list-group-bg: var(--#{$prefix}#{$state}-bg-subtle);
-
 
187
    --#{$prefix}list-group-border-color: var(--#{$prefix}#{$state}-border-subtle);
-
 
188
    --#{$prefix}list-group-action-hover-color: var(--#{$prefix}emphasis-color);
-
 
189
    --#{$prefix}list-group-action-hover-bg: var(--#{$prefix}#{$state}-border-subtle);
148
//
190
    --#{$prefix}list-group-action-active-color: var(--#{$prefix}emphasis-color);
-
 
191
    --#{$prefix}list-group-action-active-bg: var(--#{$prefix}#{$state}-border-subtle);