]> git.cworth.org Git - lmno.games/blobdiff - empathy/empathy.css
Add animated, bouncing/fading ellipses to indicate activity
[lmno.games] / empathy / empathy.css
index 704b54a5ac1759a1be929c4123a3c59cd8f343d4..9692274e3a7edd7eaaa4e4976d966e0c91df4cae 100644 (file)
     background-color: var(--accent-color-bright);
     color: var(--text-fg-on-accent-bright);
 }
     background-color: var(--accent-color-bright);
     color: var(--text-fg-on-accent-bright);
 }
+
+@keyframes bounce {
+    0% {
+        transform: translateY(0);
+        animation-timing-function: cubic-bezier(0.333, 0.667, 0.667, 1);
+    }
+    20% {
+        transform: translateY(-5px);
+        animation-timing-function: cubic-bezier(0.333, 0, 0,667, 0.333);
+    }
+    40% {
+        transform: translateY(0);
+    }
+    100% {
+        transform: translateY(0);
+    }
+}
+
+.typing span {
+    font-size: 150%;
+    line-height: 0;
+
+    display: inline-block;
+    animation-name: bounce;
+    animation-duration: 2s;
+    animation-iteration-count: infinite;
+    animation-timing-function: linear;
+}
+
+.typing span:nth-child(2) {
+    animation-delay: .2s;
+}
+
+.typing span:nth-child(3) {
+    animation-delay: .4s;
+}
+
+.typing.active span {
+    opacity: 1.0;
+}
+
+.typing.idle span {
+    opacity: 0.0;
+    transition-property: opacity;
+    transition-duration: 6s;
+    transition-delay: 3s;
+}