style.css: restore welcome banner color animation - adamsgaard.dk - my academic webpage
HTML git clone git://src.adamsgaard.dk/adamsgaard.dk
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit f1f3da83e490f1b9d25b19a33d7a8a503004ef2f
DIR parent 98e74503d6d863a72b4085d9f180736b93dcbb01
HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 26 Apr 2026 20:33:17 +0200
style.css: restore welcome banner color animation
Re-implement the color-change animation removed in d2be747 with a
single standard @keyframes block (no vendor prefixes). Add
prefers-reduced-motion guard so users who disable animations get
the static color with zero repaint cost.
Diffstat:
M style.css | 16 ++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)
---
DIR diff --git a/style.css b/style.css
@@ -90,6 +90,22 @@ li {
.welcome {
white-space: pre;
color: #5f5;
+ animation: color-change 5s infinite;
+}
+
+@keyframes color-change {
+ 0% { color: #5f5; }
+ 40% { color: #5f5; }
+ 49% { color: #55f; }
+ 50% { color: #f5f; }
+ 90% { color: #f5f; }
+ 100% { color: #55f; }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .welcome {
+ animation: none;
+ }
}
.btn {
display: incline-block;