react-led-digit 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Digit/digit.css +23 -17
- package/package.json +1 -1
package/lib/Digit/digit.css
CHANGED
|
@@ -50,40 +50,46 @@
|
|
|
50
50
|
min-width: var(--thick);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
.opacity-wrapper {
|
|
54
54
|
position: absolute;
|
|
55
55
|
width: 100%;
|
|
56
56
|
height: 100%;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
.opacity-wrapper,
|
|
60
|
+
.opacity-wrapper .segment {
|
|
61
61
|
transition-property: background-color, border-color, opacity, visibility;
|
|
62
62
|
transition-duration: var(--transition-duration);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
.opacity-wrapper.off.on .segment.off,
|
|
66
|
+
.opacity-wrapper.on .segment.off,
|
|
67
|
+
.opacity-wrapper.off .segment.on {
|
|
68
68
|
visibility: hidden;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
.opacity-wrapper.off .segment.off,
|
|
71
|
+
.opacity-wrapper.on .segment.on {
|
|
72
72
|
visibility: visible;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
.opacity-wrapper.on {
|
|
76
76
|
opacity: var(--opacity-on);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
.opacity-wrapper.off {
|
|
79
79
|
opacity: var(--opacity-off);
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
.opacity-wrapper.off.on {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
}
|
|
84
|
+
.opacity-wrapper.on:not(.off) .segment.on {
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
.opacity-wrapper.on:not(.off) .segment.off {
|
|
82
88
|
opacity: 0;
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
/* segments */
|
|
86
|
-
|
|
92
|
+
.segment {
|
|
87
93
|
--th-half-100: calc(100% - var(--th-half));
|
|
88
94
|
|
|
89
95
|
background-color: var(--color);
|
|
@@ -183,7 +189,7 @@
|
|
|
183
189
|
contain;
|
|
184
190
|
}
|
|
185
191
|
|
|
186
|
-
|
|
192
|
+
.AM {
|
|
187
193
|
bottom: calc(var(--digit-height) / 2 + var(--thick) / 4);
|
|
188
194
|
mask-image: var(--svg-am);
|
|
189
195
|
}
|
|
@@ -193,7 +199,7 @@
|
|
|
193
199
|
mask-composite: exclude;
|
|
194
200
|
mask-image: var(--svg-am), linear-gradient(var(--color) 0 0);
|
|
195
201
|
}
|
|
196
|
-
|
|
202
|
+
.PM {
|
|
197
203
|
top: calc(var(--digit-height) / 2 + var(--thick) / 4);
|
|
198
204
|
mask-image: var(--svg-pm);
|
|
199
205
|
}
|
|
@@ -225,15 +231,15 @@
|
|
|
225
231
|
left: calc(var(--digit-width) / 2 - var(--dot-border-width));
|
|
226
232
|
}
|
|
227
233
|
/* lower part of a colon */
|
|
228
|
-
|
|
234
|
+
.segment.D1 {
|
|
229
235
|
top: calc(var(--digit-height) / 3 - var(--thick) / 2);
|
|
230
236
|
}
|
|
231
237
|
/* upper part of a colon */
|
|
232
|
-
|
|
238
|
+
.segment.D2 {
|
|
233
239
|
bottom: calc(var(--digit-height) / 3 - var(--thick) / 2);
|
|
234
240
|
}
|
|
235
241
|
/* dot itself */
|
|
236
|
-
|
|
242
|
+
.segment.DP {
|
|
237
243
|
bottom: 0;
|
|
238
244
|
}
|
|
239
245
|
}
|