UNPKG

9.39 kBtext/lessView Raw
1/*!
2 * # Semantic UI - Statistic
3 * http://github.com/semantic-org/semantic-ui/
4 *
5 *
6 * Released under the MIT license
7 * http://opensource.org/licenses/MIT
8 *
9 */
10
11/*******************************
12 Theme
13*******************************/
14
15@type : 'view';
16@element : 'statistic';
17
18@import (multiple) '../../theme.config';
19
20/*******************************
21 Statistic
22*******************************/
23
24/* Standalone */
25.ui.statistic {
26 display: inline-flex;
27 flex-direction: column;
28 margin: @margin;
29 max-width: @maxWidth;
30}
31
32.ui.statistic + .ui.statistic {
33 margin: 0 0 0 @horizontalSpacing;
34}
35
36.ui.statistic:first-child {
37 margin-top: 0;
38}
39.ui.statistic:last-child {
40 margin-bottom: 0;
41}
42
43
44
45/*******************************
46 Group
47*******************************/
48
49/* Grouped */
50.ui.statistics {
51 display: flex;
52 align-items: flex-start;
53 flex-wrap: wrap;
54}
55.ui.statistics > .statistic {
56 display: inline-flex;
57 flex: 0 1 auto;
58 flex-direction: column;
59 margin: @elementMargin;
60 max-width: @elementMaxWidth;
61}
62.ui.statistics {
63 display: flex;
64 margin: @groupMargin;
65}
66
67/* Clearing */
68.ui.statistics:after {
69 display: block;
70 content: ' ';
71 height: 0;
72 clear: both;
73 overflow: hidden;
74 visibility: hidden;
75}
76
77.ui.statistics:first-child {
78 margin-top: 0;
79}
80
81
82/*******************************
83 Content
84*******************************/
85
86
87/*--------------
88 Value
89---------------*/
90
91.ui.statistics .statistic > .value,
92.ui.statistic > .value {
93 font-family: @valueFont;
94 font-size: @valueSize;
95 font-weight: @valueFontWeight;
96 line-height: @valueLineHeight;
97 color: @valueColor;
98 text-transform: @valueTextTransform;
99 text-align: @textAlign;
100}
101
102/*--------------
103 Label
104---------------*/
105
106.ui.statistics .statistic > .label,
107.ui.statistic > .label {
108 font-family: @labelFont;
109 font-size: @labelSize;
110 font-weight: @labelFontWeight;
111 color: @labelColor;
112 text-transform: @labelTextTransform;
113 text-align: @textAlign;
114}
115
116/* Top Label */
117.ui.statistics .statistic > .label ~ .value,
118.ui.statistic > .label ~ .value {
119 margin-top: @topLabelDistance;
120}
121
122/* Bottom Label */
123.ui.statistics .statistic > .value ~ .label,
124.ui.statistic > .value ~ .label {
125 margin-top: @bottomLabelDistance;
126}
127
128
129
130/*******************************
131 Types
132*******************************/
133
134/*--------------
135 Icon Value
136---------------*/
137
138.ui.statistics .statistic > .value .icon,
139.ui.statistic > .value .icon {
140 opacity: 1;
141 width: auto;
142 margin: 0;
143}
144
145/*--------------
146 Text Value
147---------------*/
148
149.ui.statistics .statistic > .text.value,
150.ui.statistic > .text.value {
151 line-height: @textValueLineHeight;
152 min-height: @textValueMinHeight;
153 font-weight: @textValueFontWeight;
154 text-align: center;
155}
156.ui.statistics .statistic > .text.value + .label,
157.ui.statistic > .text.value + .label {
158 text-align: center;
159}
160
161/*--------------
162 Image Value
163---------------*/
164
165.ui.statistics .statistic > .value img,
166.ui.statistic > .value img {
167 max-height: @imageHeight;
168 vertical-align: @imageVerticalAlign;
169}
170
171
172
173/*******************************
174 Variations
175*******************************/
176
177
178/*--------------
179 Count
180---------------*/
181
182
183.ui.ten.statistics {
184 margin: @itemGroupMargin;
185}
186.ui.ten.statistics .statistic {
187 min-width: @tenColumn;
188 margin: @itemMargin;
189}
190
191.ui.nine.statistics {
192 margin: @itemGroupMargin;
193}
194.ui.nine.statistics .statistic {
195 min-width: @nineColumn;
196 margin: @itemMargin;
197}
198
199.ui.eight.statistics {
200 margin: @itemGroupMargin;
201}
202.ui.eight.statistics .statistic {
203 min-width: @eightColumn;
204 margin: @itemMargin;
205}
206
207.ui.seven.statistics {
208 margin: @itemGroupMargin;
209}
210.ui.seven.statistics .statistic {
211 min-width: @sevenColumn;
212 margin: @itemMargin;
213}
214
215.ui.six.statistics {
216 margin: @itemGroupMargin;
217}
218.ui.six.statistics .statistic {
219 min-width: @sixColumn;
220 margin: @itemMargin;
221}
222
223.ui.five.statistics {
224 margin: @itemGroupMargin;
225}
226.ui.five.statistics .statistic {
227 min-width: @fiveColumn;
228 margin: @itemMargin;
229}
230
231.ui.four.statistics {
232 margin: @itemGroupMargin;
233}
234.ui.four.statistics .statistic {
235 min-width: @fourColumn;
236 margin: @itemMargin;
237}
238
239.ui.three.statistics {
240 margin: @itemGroupMargin;
241}
242.ui.three.statistics .statistic {
243 min-width: @threeColumn;
244 margin: @itemMargin;
245}
246
247.ui.two.statistics {
248 margin: @itemGroupMargin;
249}
250.ui.two.statistics .statistic {
251 min-width: @twoColumn;
252 margin: @itemMargin;
253}
254
255.ui.one.statistics {
256 margin: @itemGroupMargin;
257}
258.ui.one.statistics .statistic {
259 min-width: @oneColumn;
260 margin: @itemMargin;
261}
262
263
264
265
266/*--------------
267 Horizontal
268---------------*/
269
270.ui.horizontal.statistic {
271 flex-direction: row;
272 align-items: center;
273}
274.ui.horizontal.statistics {
275 flex-direction: column;
276 margin: 0;
277 max-width: none;
278}
279.ui.horizontal.statistics .statistic {
280 flex-direction: row;
281 align-items: center;
282 max-width: none;
283 margin: @horizontalGroupElementMargin;
284}
285
286.ui.horizontal.statistic > .text.value,
287.ui.horizontal.statistics > .statistic > .text.value {
288 min-height: 0 !important;
289}
290.ui.horizontal.statistics .statistic > .value .icon,
291.ui.horizontal.statistic > .value .icon {
292 width: @iconWidth;
293}
294
295.ui.horizontal.statistics .statistic > .value,
296.ui.horizontal.statistic > .value {
297 display: inline-block;
298 vertical-align: middle;
299}
300.ui.horizontal.statistics .statistic > .label,
301.ui.horizontal.statistic > .label {
302 display: inline-block;
303 vertical-align: middle;
304 margin: 0 0 0 @horizontalLabelDistance;
305}
306
307/*--------------
308 Inverted
309---------------*/
310
311.ui.inverted.statistics .statistic > .value,
312.ui.inverted.statistic .value {
313 color: @invertedValueColor;
314}
315.ui.inverted.statistics .statistic > .label,
316.ui.inverted.statistic .label {
317 color: @invertedLabelColor;
318}
319
320/*--------------
321 Colors
322---------------*/
323
324each(@colors,{
325 @color: replace(@key,'@','');
326 @c: @colors[@@color][color];
327 @l: @colors[@@color][light];
328
329 .ui.@{color}.statistics .statistic > .value,
330 .ui.statistics .@{color}.statistic > .value,
331 .ui.@{color}.statistic > .value {
332 color: @c;
333 }
334 .ui.inverted.@{color}.statistics .statistic > .value,
335 .ui.statistics .inverted.@{color}.statistic > .value,
336 .ui.inverted.@{color}.statistic > .value {
337 color: @l;
338 }
339})
340
341/*--------------
342 Floated
343---------------*/
344
345.ui[class*="left floated"].statistic {
346 float: left;
347 margin: @leftFloatedMargin;
348}
349.ui[class*="right floated"].statistic {
350 float: right;
351 margin: @rightFloatedMargin;
352}
353.ui.floated.statistic:last-child {
354 margin-bottom: 0;
355}
356
357/*--------------
358 Stackable
359---------------*/
360
361@media only screen and (max-width: @largestMobileScreen) {
362 .ui.stackable.statistics {
363 width: auto;
364 margin-left: 0 !important;
365 margin-right: 0 !important;
366 }
367 .ui.stackable.statistics > .statistic {
368 width: 100% !important;
369 margin: 0 0 !important;
370 padding: (@stackableRowSpacing / 2) (@stackableGutter / 2) !important;
371 }
372}
373
374
375/*--------------
376 Sizes
377---------------*/
378
379
380/* Mini */
381.ui.mini.statistics .statistic > .value,
382.ui.mini.statistic > .value {
383 font-size: @miniValueSize !important;
384}
385.ui.mini.horizontal.statistics .statistic > .value,
386.ui.mini.horizontal.statistic > .value {
387 font-size: @miniHorizontalValueSize !important;
388}
389.ui.mini.statistics .statistic > .text.value,
390.ui.mini.statistic > .text.value {
391 font-size: @miniTextValueSize !important;
392}
393
394
395/* Tiny */
396.ui.tiny.statistics .statistic > .value,
397.ui.tiny.statistic > .value {
398 font-size: @tinyValueSize !important;
399}
400.ui.tiny.horizontal.statistics .statistic > .value,
401.ui.tiny.horizontal.statistic > .value {
402 font-size: @tinyHorizontalValueSize !important;
403}
404.ui.tiny.statistics .statistic > .text.value,
405.ui.tiny.statistic > .text.value {
406 font-size: @tinyTextValueSize !important;
407}
408
409/* Small */
410.ui.small.statistics .statistic > .value,
411.ui.small.statistic > .value {
412 font-size: @smallValueSize !important;
413}
414.ui.small.horizontal.statistics .statistic > .value,
415.ui.small.horizontal.statistic > .value {
416 font-size: @smallHorizontalValueSize !important;
417}
418.ui.small.statistics .statistic > .text.value,
419.ui.small.statistic > .text.value {
420 font-size: @smallTextValueSize !important;
421}
422
423/* Medium */
424.ui.statistics .statistic > .value,
425.ui.statistic > .value {
426 font-size: @valueSize !important;
427}
428.ui.horizontal.statistics .statistic > .value,
429.ui.horizontal.statistic > .value {
430 font-size: @horizontalValueSize !important;
431}
432.ui.statistics .statistic > .text.value,
433.ui.statistic > .text.value {
434 font-size: @textValueSize !important;
435}
436
437/* Large */
438.ui.large.statistics .statistic > .value,
439.ui.large.statistic > .value {
440 font-size: @largeValueSize !important;
441}
442.ui.large.horizontal.statistics .statistic > .value,
443.ui.large.horizontal.statistic > .value {
444 font-size: @largeHorizontalValueSize !important;
445}
446.ui.large.statistics .statistic > .text.value,
447.ui.large.statistic > .text.value {
448 font-size: @largeTextValueSize !important;
449}
450
451/* Huge */
452.ui.huge.statistics .statistic > .value,
453.ui.huge.statistic > .value {
454 font-size: @hugeValueSize !important;
455}
456.ui.huge.horizontal.statistics .statistic > .value,
457.ui.huge.horizontal.statistic > .value {
458 font-size: @hugeHorizontalValueSize !important;
459}
460.ui.huge.statistics .statistic > .text.value,
461.ui.huge.statistic > .text.value {
462 font-size: @hugeTextValueSize !important;
463}
464
465
466.loadUIOverrides();