aboutsummaryrefslogtreecommitdiffstats
path: root/static/deck.css
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-11 20:29:51 +0100
committerDanilo M. <danix@danix.xyz>2026-11-11 20:29:51 +0100
commitc6f23856f080feee37c4972fb6689332b9873574 (patch)
tree26ded8cf2dd6b70639adc4101e98eaaa09541d43 /static/deck.css
parent1c3efe5835101bbff1518031f988ae1b8ec70aa1 (diff)
downloaddeck-it-c6f23856f080feee37c4972fb6689332b9873574.tar.gz
deck-it-c6f23856f080feee37c4972fb6689332b9873574.zip
feat(dashboard): rain into the battery chip while charging
Streaks fall right to left across the empty part of the battery bar into the fill's edge while the tablet reports charging; still under prefers-reduced-motion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/deck.css')
-rw-r--r--static/deck.css12
1 files changed, 12 insertions, 0 deletions
diff --git a/static/deck.css b/static/deck.css
index 81a7428..a25ee46 100644
--- a/static/deck.css
+++ b/static/deck.css
@@ -665,6 +665,18 @@ select {
.dash .chip svg path.hy { fill: url(#hyfill); stroke: url(#hyline); }
.dash .chip svg path.up { fill: color-mix(in srgb, var(--udt-text) 8%, transparent); stroke: color-mix(in srgb, var(--udt-text) 30%, transparent); }
.dash .chip .fill { right: auto; width: 0; background: color-mix(in srgb, var(--udt-accent) 20%, transparent); transition: width .4s; }
+/* Charging: streaks rain right to left into the fill's edge. The strip sits past
+ the fill and the chip's overflow clips it; each layer moves a whole tile per
+ loop, so it wraps seamlessly at its own speed. */
+.dash .c-bat.charging .fill::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 100vw;
+ --r: color-mix(in srgb, var(--udt-accent) 55%, transparent);
+ background: linear-gradient(90deg, var(--r), transparent 14px) 0 22% / 47px 2px repeat-x,
+ linear-gradient(90deg, var(--r), transparent 9px) 13px 45% / 31px 2px repeat-x,
+ linear-gradient(90deg, var(--r), transparent 18px) 29px 68% / 59px 2px repeat-x,
+ linear-gradient(90deg, var(--r), transparent 11px) 7px 88% / 41px 2px repeat-x;
+ animation: bat-rain .9s linear infinite; }
+@keyframes bat-rain { to { background-position: -94px 22%, -49px 45%, -30px 68%, -75px 88%; } }
+@media (prefers-reduced-motion: reduce) { .dash .c-bat.charging .fill::after { animation: none; } }
.dash .chip .ic { position: relative; flex: none; width: 1.4rem; font-size: 1.25rem; line-height: 1; color: var(--udt-overlay1); }
.dash .chip .brand.ic { width: 20px; height: 20px; }
.dash .chip .col { position: relative; display: flex; flex-direction: column; min-width: 0; }