]> git.ardis.lu - css-loaders/commitdiff
Add text-focus card
authorArdis Lu <ardisglu@gmail.com>
Sun, 28 Jan 2024 23:21:36 +0000 (15:21 -0800)
committerArdis Lu <ardisglu@gmail.com>
Sun, 28 Jan 2024 23:21:36 +0000 (15:21 -0800)
index.html

index 20905ed2ed0e409c9b4f66064aa54451c6077ef0..1ddb3bfd9eb4b788a61e0bedade79d849794ec00 100644 (file)
       transition: scale 200ms;
     }
 
+    .card.text-focus {
+      margin-block: 8px;
+      border: 1px solid hsl(0deg 0% 70%);
+      border-radius: 12px;
+    }
+
+    .text-focus p {
+      filter: blur(4px);
+      transition: filter 400ms;
+    }
+
+    .card.text-focus:hover p,
+    .card.text-focus:focus-within p {
+      filter: blur(0);
+      transition: filter 200ms;
+    }
+
     /* Button hovers */
 
     button {
         <h2>Grow on hover</h2>
         <p>This card will grow larger when the card is hovered or focused.</p>
       </div>
+
+      <div class="card text-focus">
+        <h2>Text focus</h2>
+        <p>The text inside this card will become more "in-focus" when this card is hovered or focused.</p>
+      </div>
+
     </section>
 
     <section>
This page took 0.037926 seconds and 4 git commands to generate.