From 16979a827f920ff7f0ca55674dd78c2214d31446 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 7 Apr 2023 20:32:20 -0700 Subject: [PATCH] Style in the same way as

---
 index.html | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index 66edb1e..c4183d3 100644
--- a/index.html
+++ b/index.html
@@ -52,12 +52,28 @@
       inline-size: min(80ch, 100% - 16px);
     }
 
-    pre {
+    pre,
+    code {
       background: hsl(216deg 50% 90%);
-      padding: 8px;
       border-radius: 4px;
       border: 1px solid hsl(216deg 50% 75%);
       overflow: auto;
+      transition: background-color 500ms, filter 800ms;
+    }
+
+    pre {
+      padding: 8px;
+    }
+
+    code {
+      padding-block: 2px;
+      padding-inline: 4px;
+    }
+
+    :is(pre, code):is(:hover, :focus-within) {
+      background: hsl(216deg 50% 87%);
+      filter: drop-shadow(0 0 8px hsl(216deg 50% 90%));
+      transition: background-color 200ms, filter 300ms;
     }
 
     .line-clamp {
-- 
2.47.3