Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
// The only class we need for icons is .icon
2
// Standardize the size, padding and alignment for all icons in Moodle.
3
 
4
// Size of default icons.
5
$icon-width: 20px;
6
$icon-height: 20px;
7
// Size of big icons.
8
$icon-medium-width: 24px;
9
$icon-medium-height: 24px;
10
// Size of big icons.
11
$icon-big-width: 60px;
12
$icon-big-height: 60px;
13
// Size of icon boxes.
14
$icon-box-width: 48px;
15
$icon-box-height: 48px;
16
 
17
// stylelint-disable
18
$iconsizes: () !default;
19
$iconsizes: map-merge((0: 0,
20
        1: ($icon-width * .25),
21
        2: ($icon-width * .5),
22
        3: $icon-width,
23
        4: ($icon-width * 1.5),
24
        5: ($icon-width * 2),
25
        6: ($icon-width * 2.5),
26
        7: ($icon-width * 3)), $iconsizes);
27
// stylelint-enable
28
 
29
.icon {
30
    width: $icon-width;
31
    height: $icon-height;
1441 ariadna 32
    font-size: 16px;
1 efrain 33
    line-height: 18px;
34
    // vertical-align: middle;
35
    margin: 0;
36
    padding: 0;
37
    box-sizing: content-box;
38
 
39
    .sup & {
40
        width: 16px;
41
        height: 16px;
42
        font-size: 12px;
43
    }
44
 
45
    &.itemicon {
46
        margin-right: 0.25rem;
47
    }
48
 
49
    &.spacer {
50
        display: none;
51
    }
52
 
53
    &.iconsize-big {
54
        width: $icon-big-width;
55
        height: $icon-big-height;
56
        font-size: $icon-big-height;
57
    }
58
}
59
 
60
.icon-box {
61
    line-height: 1.5;
62
}
63
 
64
        // Mainly for icons in page title
65
        .iconlarge {
66
            font-size: 40px;
67
            width: 40px;
68
            height: 40px;
69
        }
70
 
71
        h2 .icon.iconlarge {
72
            margin-right: .5rem;
73
        }
74
 
75
.action-menu-item a:first-of-type>.icon {
76
    margin-left: 0.5rem;
77
}
78
 
79
.action-menu-item a:hover {
80
    text-decoration: none;
81
}
82
 
83
// YUI 2 Tree View icons must not have a margin left.
84
.ygtvcell .icon {
85
    margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */
86
 
87
    .theme-dark & {
88
        filter: invert(1);
89
    }
90
}
91
 
92
// In the navigation, tree icons should not have margins.
93
.block_navigation,
94
.block_settings {
95
    .tree_item .icon {
96
        margin-left: 0;
97
    }
98
}
99
 
100
[data-action=toggle-drawer] .icon {
101
    margin: 0;
102
}
103
 
104
// Apply in special cases where the default icons styles does not work properly. Eg file picker buttons.
105
.icon-no-spacing a>.icon {
106
    margin: 0;
107
}
108
 
109
.icon-no-margin {
110
    .icon {
111
        margin-left: 0;
112
        margin-right: 0;
113
        margin-top: 0;
114
        margin-bottom: 0;
115
    }
116
}
117
 
118
.completion-dialog {
1441 ariadna 119
    padding: 0!important;
1 efrain 120
    font-size: $font-size-xs;
121
 
1441 ariadna 122
    [role="list"] {
123
        gap: 5px;
124
    }
125
 
1 efrain 126
    .rui-icon {
127
        margin-right: 5px;
128
        width: 14px;
129
        height: 14px;
130
        filter: invert(1);
131
    }
132
}
133
 
134
 
135
.icon-large>.icon {
136
    width: ($icon-width * 2);
137
    height: ($icon-height * 2);
138
}
139
 
140
@each $size,
141
$length in $iconsizes {
142
    .icon-size-#{$size} {
143
        .icon {
144
            height: $length !important;
145
            /* stylelint-disable-line declaration-no-important */
146
            width: $length !important;
147
            /* stylelint-disable-line declaration-no-important */
148
            font-size: $length !important;
149
            /* stylelint-disable-line declaration-no-important */
150
        }
151
    }
152
}
153
 
154
.helplink .icon {
155
    margin-right: 0.5rem;
156
}
157
 
158
.action-icon + a {
159
    margin-left: 0.5rem;
160
}
161
 
162
.dropdown-item.action-icon {
163
    border-radius: $btn-border-radius-lg;
164
}
165
 
166
.icon-req {
167
    padding: 4px;
168
    position: relative;
169
    top: 0;
170
 
171
    width: auto;
172
    height: auto;
173
    background: $red-100;
174
    border-radius: $btn-border-radius;
175
 
176
    font-size: 8px;
177
    color: $red-600!important;
178
 
179
    .fdescription & {
180
        background-color: transparent;
181
        color: $yellow-700;
182
    }
183
}
184
 
185
.icon-info {
186
    padding: 7px;
187
}
188
 
189
// Moodle 4.x.
190
.icons-collapse-expand {
191
    display: flex;
192
    align-items: center;
193
 
194
    img {
195
        .theme-dark & {
196
            filter: invert(1);
197
        }
198
    }
199
 
200
    .expanded-icon {
201
        display: flex;
202
        align-items: center;
203
        padding: 0!important;
204
    }
205
 
206
    .collapsed-icon {
207
        display: none;
208
    }
209
 
210
    &.collapsed {
211
        .expanded-icon {
212
            display: none;
213
        }
214
 
215
        .collapsed-icon {
216
            display: flex;
217
            align-items: center;
218
            line-height: 0;
219
        }
220
    }
221
}
222
 
223
.dir-rtl .icons-collapse-expand.collapsed .collapsed-icon {
224
    transform: scaleX(1);
225
}
226
 
227
.rui-adv-icon {
228
    display: inline-flex;
229
    justify-content: center;
230
    align-items: center;
231
 
232
    background-color: $gray-100;
233
    color: $gray-600;
234
 
235
    font-size: 10px;
236
    font-weight: $font-weight-bold;
237
 
238
    width: 16px;
239
    height: 16px;
240
    border-radius: 12px;
241
 
242
    .theme-dark & {
243
        background-color: $dm-gray-100;
244
        color: $dm-gray-600;
245
    }
246
}
247
 
248
.activityiconcontainer {
249
    //margin-top: 5px;
250
    margin-right: 12px;
251
    width: $activity-iconcontainer-width;
252
    height: $activity-iconcontainer-height;
253
    display: inline-flex;
254
    justify-content: center;
255
    align-items: center;
256
    background-color: $gray-100;
257
    border-radius: $activity-iconcontainer-width;
258
    padding: 0.7rem;
259
 
260
    &.small {
261
        width: $activity-iconcontainer-width * 0.5;
262
        height: $activity-iconcontainer-height * 0.5;
263
    }
264
 
265
    a {
266
        line-height: 0;
267
    }
268
}
269
 
270
@each $type, $value in $activity-icon-colors {
271
    .activityiconcontainer.#{$type} {
272
        background-color: $value;
273
        .activityicon,
274
        .icon {
275
            margin: 0;
276
            height: 24px;
277
            width: 24px;
278
        }
279
    }
280
}
281
 
282
.icon-box {
283
    width: $icon-box-width;
284
    height: $icon-box-height;
285
    display: inline-flex;
286
    justify-content: center;
287
    align-items: center;
288
    background-color: $gray-100;
289
    border-radius: 12px;
290
    padding: 0.7rem;
291
 
292
    .theme-dark & {
293
        background-color: $dm-gray-100;
294
    }
295
 
296
    .icon {
297
        margin: 0;
298
        height: $icon-medium-width;
299
        width: $icon-medium-height;
300
    }
301
}
302
 
303
 
304
// Make activtity colours available for custom modules.
305
:root {
306
    @each $type,
307
    $value in $activity-icon-colors {
308
        --activity#{$type}: #{$value};
309
    }
310
}
311
 
312
.movecategory {
313
    .icon {
314
        background-color: $white;
315
        border-radius: $btn-border-radius-lg;
316
        box-shadow: $box-shadow-md;
317
        padding: 10px;
318
        width: 16px;
319
        height: 16px;
320
 
321
        transition: $transition-base;
322
 
323
        &:hover {
324
            box-shadow: $box-shadow;
325
        }
326
 
327
        .theme-dark & {
328
            filter: invert(1);
329
            box-shadow: none;
330
        }
331
    }
332
}
333
 
334
.movefield {
335
    .icon {
336
        background-color: $white;
337
        border-radius: $btn-border-radius-lg;
338
        box-shadow: $box-shadow;
339
        padding: 8px;
340
        width: 14px;
341
        height: 14px;
342
 
1441 ariadna 343
        font-size: 12px;
344
        line-height: 14px;
345
 
1 efrain 346
        transition: $transition-base;
347
 
348
        &:hover {
349
            box-shadow: $box-shadow-md;
350
        }
351
 
352
        .theme-dark & {
353
            filter: invert(1);
354
            box-shadow: none;
355
        }
356
    }
357
}
358
 
359
 
360
.generaltable {
361
    .itemicon {
362
        padding: 3px;
363
        border-radius: 30px;
364
        background-color: $gray-100;
1441 ariadna 365
        box-sizing: content-box;
1 efrain 366
    }
367
}