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