From e5ea568f5662a0786bfb0156aece07028d319d38 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 28 Oct 2022 23:30:53 -0700 Subject: [PATCH] Simplify focus selector --- index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 67ec15e..0da7694 100644 --- a/index.html +++ b/index.html @@ -107,8 +107,7 @@ transition: transform 150ms; } - div:has(input:focus)::before, - div:has(textarea:focus)::before { + div:focus-within::before { transform: scaleY(1); transition: transform 400ms; } @@ -131,8 +130,7 @@ font-weight: 300; } - div:has(input:focus) aside, - div:has(textarea:focus) aside { + div:focus-within aside { font-weight: 500; } } -- 2.47.3