]> git.ardis.lu - css-loaders/commitdiff
Tweak animation to be direction-agnostic
authorArdis Lu <ardisglu@gmail.com>
Sat, 4 Dec 2021 08:00:40 +0000 (00:00 -0800)
committerArdis Lu <ardisglu@gmail.com>
Sat, 4 Dec 2021 08:00:40 +0000 (00:00 -0800)
Background-position does not have logical properties so it will fail on vertical reading modes.

index.html

index 48d8bc7cbea46e482abff0a5e086fc997af327d4..c3cff0672ba12b5a683403d14cd1ac5e77e2b506 100644 (file)
 
     .skeleton-line {
       block-size: 1rem;
-      background: linear-gradient(90deg, black, white, black);
-      background-size: 200%;
-      animation: 1s linear infinite alternate shimmer;
+      margin-block: 1rem;
+      animation: shimmer 1s alternate infinite;
+      background: hsl(0deg 0% 50%);
     }
 
     @keyframes shimmer {
-      from {
-        background-position-x: 0%;
-      }
-
-      to {
-        background-position-x: 100%;
+      100% {
+        background: hsl(0deg 0% 85%);
       }
     }
 
This page took 0.03667 seconds and 4 git commands to generate.