From c44f526babc2995ad83a0db3058f330c6fb27a02 Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Tue, 17 Nov 2026 01:21:35 -0800 Subject: [PATCH] Make pill hovers quick and the same size, and restore the current page's ring. Hover now only shows an outline (plus the prism edge), over 0.1s, with no scaling. The resting hover outline no longer overrides the current page's mark, which had lost its white ring. Co-Authored-By: Claude Opus 5.5 --- public/site.css | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/public/site.css b/public/site.css index e192a3b..bc4d15d 100644 --- a/public/site.css +++ b/public/site.css @@ -3473,7 +3473,7 @@ body[data-leaving] .home-prism { --edge: calc(var(--fs) * var(--edge-r)) calc(var(--fs) * var(--edge-r)) 0 calc(var(--fs) * var(--edge-r) * -1) var(--prism-r), calc(var(--fs) * var(--edge-b)) calc(var(--fs) * var(--edge-b)) 0 calc(var(--fs) * var(--edge-b)) var(--prism-b); - transition: --fs 0.22s ease, background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease; + transition: --fs 0.1s ease-out, background-color 0.1s ease-out, color 0.1s ease-out, box-shadow 0.1s ease-out; } /* Nav links: a capsule drawn behind each label; the current page is a mark. */ @@ -3824,36 +3824,16 @@ body:has(.home-page) { --nav-mark-text: #f9f8f4; } -/* Hover, in every theme: an outline grows in around a link or the menu circle, and - a mark swells a little. Prism adds its red/blue edge on top. */ -.site-nav > a:not(.nav-avatar)::before, -.nav-menu-toggle::before { - transform: scale(0.9); +/* Hover, in every theme: an outline appears around a link or the menu circle, with + no change in size. Prism adds its red/blue edge on top. */ +.site-nav > a:not(.nav-avatar):not(.active)::before, +.nav-menu-toggle:not([aria-expanded="true"])::before { box-shadow: inset 0 0 0 1px transparent, var(--edge); } -.site-nav > a:not(.nav-avatar):is(:hover, :focus-visible)::before, -.nav-menu-toggle:is(:hover, :focus-visible)::before { - transform: scale(1); +.site-nav > a:not(.nav-avatar):not(.active):is(:hover, :focus-visible)::before, +.nav-menu-toggle:not([aria-expanded="true"]):is(:hover, :focus-visible)::before { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 45%, transparent), var(--edge); } -.site-nav > a.active:not(.nav-avatar)::before { - transform: scale(1); -} -.site-nav > a.active:not(.nav-avatar):is(:hover, :focus-visible)::before { - transform: scale(1.06); - box-shadow: inset 0 0 0 2px var(--mark), inset 0 0 0 3.75px var(--mark-ring), var(--edge); -} -.nav-menu-toggle[aria-expanded="true"]::before { - transform: scale(1); -} -.nav-menu-toggle[aria-expanded="true"]:is(:hover, :focus-visible)::before { - transform: scale(1.06); - box-shadow: inset 0 0 0 2px var(--mark), inset 0 0 0 3.5px var(--mark-ring), var(--edge); -} .prism-seg button:not([aria-pressed="true"]):is(:hover, :focus-visible) { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 45%, transparent), var(--edge); } -.prism-seg button[aria-pressed="true"]:is(:hover, :focus-visible), -.semble-filter-bar button[aria-pressed="true"]:is(:hover, :focus-visible) { - transform: scale(1.04); -} -- knotmirror 0.0.1