Proyectos de Subversion Moodle

Rev

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