-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDiskStateProgressBar.scss
85 lines (63 loc) · 1.88 KB
/
DiskStateProgressBar.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@use '../../styles/mixins';
.storage-disk-progress-bar {
$block: &;
$border-width: 1px;
$outer-border-radius: 4px;
$inner-border-radius: $outer-border-radius - $border-width;
--progress-bar-full-height: var(--g-text-body-3-line-height);
--progress-bar-compact-height: 12px;
position: relative;
z-index: 0;
min-width: 50px;
height: var(--progress-bar-full-height);
text-align: center;
color: var(--g-color-text-primary);
border: $border-width solid var(--entity-state-border-color);
border-radius: $outer-border-radius;
background-color: var(--entity-state-background-color);
@include mixins.entity-state-colors();
&_compact {
min-width: 0;
height: var(--progress-bar-compact-height);
border-radius: 2px;
}
&_faded {
background-color: unset;
}
&_inactive {
opacity: 0.5;
}
&_empty {
color: var(--g-color-text-hint);
border-style: dashed;
background-color: unset;
}
&__fill-bar {
position: absolute;
top: 0;
left: 0;
height: 100%;
border-radius: $inner-border-radius 0 0 $inner-border-radius;
background-color: var(--entity-state-fill-color);
&_faded {
// Bg color is light variant, use it to make bar less bright
background-color: var(--entity-state-background-color);
}
&_compact {
border-radius: 1px;
}
&_inverted {
right: 0;
left: auto;
border-radius: 0 $inner-border-radius $inner-border-radius 0;
}
}
&__title {
position: relative;
z-index: 2;
font-size: var(--g-text-body-1-font-size);
// bar height minus borders
line-height: calc(var(--progress-bar-full-height) - #{$border-width * 2});
color: inherit;
}
}