From 65506dc2b1a50193ac17c23ffb7f5ec0c2dd65c4 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sun, 28 Jan 2024 15:21:36 -0800 Subject: [PATCH] Add text-focus card --- index.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/index.html b/index.html index 20905ed..1ddb3bf 100644 --- a/index.html +++ b/index.html @@ -298,6 +298,23 @@ 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 { @@ -591,6 +608,12 @@

Grow on hover

This card will grow larger when the card is hovered or focused.

+ +
+

Text focus

+

The text inside this card will become more "in-focus" when this card is hovered or focused.

+
+
-- 2.47.3