From e52481f626288681b83a948babdf08bd5a74bb8f Mon Sep 17 00:00:00 2001 From: Reda Lemeden Date: Sun, 22 Nov 2026 17:50:35 +0100 Subject: [PATCH 1/3] Tint the project circle icons orange at rest --- TODO.md | 2 +- src/components/CircleLink.astro | 31 +++++++++++++++++++++++-------- src/pages/[...lang]/index.astro | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/TODO.md b/TODO.md index 166faff..38c6b95 100644 --- a/TODO.md +++ b/TODO.md @@ -9,7 +9,7 @@ Mirror of Tasker project `4rays-net`. One focused PR. Validate with `pnpm check`, `pnpm format:check`, and `pnpm build`, and check the page in a browser in light and dark. -- [ ] Tint the project circle icons orange at rest (Tasker #543) (Goal 6a952708a8fb) +- [x] Tint the project circle icons orange at rest (Tasker #543) (Goal 6a952708a8fb) Criteria C1 and C2. Verified against 3e3a1e9. Gap: src/components/CircleLink.astro sets `.disc :global(img) { filter: grayscale(1) contrast(1.05); }`, so the Circle and Combolab images are grayscale at rest and reveal full colour on hover/focus. The non-interactive TBA circle shows the mark 極秘 in `.monogram` (src/pages/[...lang]/index.astro) in var(--muted-foreground), which is gray. Scope: diff --git a/src/components/CircleLink.astro b/src/components/CircleLink.astro index 6328bfc..b9e25fe 100644 --- a/src/components/CircleLink.astro +++ b/src/components/CircleLink.astro @@ -1,7 +1,8 @@ --- /** * A circular link. The disc content comes from the default slot. - * Hover / focus: the ring traces itself in and the image comes to full colour. + * Image discs carry an orange monochrome tint at rest; hover / focus traces + * the ring in and reveals the full colour. */ interface Props { /** Leave out to render a non-interactive circle (for example, an unreleased project). */ @@ -73,6 +74,8 @@ const Tag = href ? "a" : "div"; box-shadow: inset 0 0 0 1px var(--border), 0 10px 30px -12px rgb(0 0 0 / 0.45); + /* Keep the tint overlay's blend mode inside the disc. */ + isolation: isolate; transition: box-shadow 0.5s var(--ease), background-color 0.4s var(--ease); @@ -82,11 +85,20 @@ const Tag = href ? "a" : "div"; width: 100%; height: 100%; object-fit: cover; - filter: grayscale(1) contrast(1.05); transform: scale(1.001); - transition: - filter 0.5s var(--ease), - transform 0.7s var(--ease); + transition: transform 0.7s var(--ease); + } + + /* Orange monochrome tint at rest: the accent hue over the image's own + luminance, so the artwork stays recognizable. */ + .disc:has(:global(img))::after { + content: ""; + position: absolute; + inset: 0; + background: var(--accent); + mix-blend-mode: color; + pointer-events: none; + transition: opacity 0.5s var(--ease); } .orb-ring { @@ -146,10 +158,13 @@ const Tag = href ? "a" : "div"; } .circle:is(:hover, :focus-visible) .disc :global(img) { - filter: none; transform: scale(1.08); } + .circle:is(:hover, :focus-visible) .disc:has(:global(img))::after { + opacity: 0; + } + .circle:is(:hover, :focus-visible) .name { color: var(--accent-ink); } @@ -187,8 +202,8 @@ const Tag = href ? "a" : "div"; transition-delay: 0s !important; } - .disc :global(img) { - transition: filter 0.3s linear; + .disc:has(:global(img))::after { + transition: opacity 0.3s linear; } .circle:is(:hover, :focus-visible) .disc :global(img) { diff --git a/src/pages/[...lang]/index.astro b/src/pages/[...lang]/index.astro index 81db51b..f4122d8 100644 --- a/src/pages/[...lang]/index.astro +++ b/src/pages/[...lang]/index.astro @@ -215,7 +215,7 @@ const monogram = (name: string) => font-size: 1.6rem; font-weight: 300; letter-spacing: 0.08em; - color: var(--muted-foreground); + color: var(--accent); } .monogram:lang(ja) { From c2b7631859180c6913586d1473880bc03cadb56a Mon Sep 17 00:00:00 2001 From: Reda Lemeden Date: Sun, 22 Nov 2026 22:10:02 +0100 Subject: [PATCH 2/3] Fix the orange tint reveal on Safari --- src/components/CircleLink.astro | 48 ++++++++++++++++++++++++--------- src/pages/[...lang]/index.astro | 25 ++++++++++++----- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/src/components/CircleLink.astro b/src/components/CircleLink.astro index b9e25fe..ac68a06 100644 --- a/src/components/CircleLink.astro +++ b/src/components/CircleLink.astro @@ -2,7 +2,7 @@ /** * A circular link. The disc content comes from the default slot. * Image discs carry an orange monochrome tint at rest; hover / focus traces - * the ring in and reveals the full colour. + * the ring in and crossfades a colour copy of the image over the tint. */ interface Props { /** Leave out to render a non-interactive circle (for example, an unreleased project). */ @@ -86,11 +86,12 @@ const Tag = href ? "a" : "div"; height: 100%; object-fit: cover; transform: scale(1.001); - transition: transform 0.7s var(--ease); } /* Orange monochrome tint at rest: the accent hue over the image's own - luminance, so the artwork stays recognizable. */ + luminance, so the artwork stays recognizable. The blend layer and the + image under it never animate; WebKit's blend compositing stays stable + that way, and the reveal happens on a colour copy above the tint. */ .disc:has(:global(img))::after { content: ""; position: absolute; @@ -98,7 +99,21 @@ const Tag = href ? "a" : "div"; background: var(--accent); mix-blend-mode: color; pointer-events: none; - transition: opacity 0.5s var(--ease); + } + + /* The colour copy fades in over the tint as a matching grayscale first, + then un-grays to full colour, so the transition never mixes the tint + hue with the artwork hue. */ + .disc :global(img.reveal) { + position: absolute; + inset: 0; + z-index: 1; + opacity: 0; + filter: grayscale(1); + transition: + opacity 0.5s var(--ease) 0.4s, + filter 0.4s var(--ease), + transform 0.7s var(--ease); } .orb-ring { @@ -157,12 +172,14 @@ const Tag = href ? "a" : "div"; 0 18px 40px -14px color-mix(in oklab, var(--accent) 45%, transparent); } - .circle:is(:hover, :focus-visible) .disc :global(img) { + .circle:is(:hover, :focus-visible) .disc :global(img.reveal) { + opacity: 1; + filter: none; transform: scale(1.08); - } - - .circle:is(:hover, :focus-visible) .disc:has(:global(img))::after { - opacity: 0; + transition: + opacity 0.5s var(--ease), + filter 0.4s var(--ease) 0.5s, + transform 0.7s var(--ease); } .circle:is(:hover, :focus-visible) .name { @@ -202,12 +219,19 @@ const Tag = href ? "a" : "div"; transition-delay: 0s !important; } - .disc:has(:global(img))::after { - transition: opacity 0.3s linear; + .disc :global(img.reveal) { + transition: + opacity 0.3s linear 0.3s, + filter 0.3s linear, + transform 0.01s linear; } - .circle:is(:hover, :focus-visible) .disc :global(img) { + .circle:is(:hover, :focus-visible) .disc :global(img.reveal) { transform: none; + transition: + opacity 0.3s linear, + filter 0.3s linear 0.3s, + transform 0.01s linear; } } diff --git a/src/pages/[...lang]/index.astro b/src/pages/[...lang]/index.astro index f4122d8..b6622cf 100644 --- a/src/pages/[...lang]/index.astro +++ b/src/pages/[...lang]/index.astro @@ -52,13 +52,24 @@ const monogram = (name: string) => tagline={t.home.projects[project.id].tagline} > {project.image ? ( - + <> + + + ) : ( {project.mark ?? monogram(project.name)} From 35da8a511184bc41eebbffd12010385ddae0f97b Mon Sep 17 00:00:00 2001 From: Reda Lemeden Date: Sun, 22 Nov 2026 23:22:29 +0100 Subject: [PATCH 3/3] Fade the icon tint straight to full colour --- src/components/CircleLink.astro | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/components/CircleLink.astro b/src/components/CircleLink.astro index ac68a06..4e1db6c 100644 --- a/src/components/CircleLink.astro +++ b/src/components/CircleLink.astro @@ -101,18 +101,15 @@ const Tag = href ? "a" : "div"; pointer-events: none; } - /* The colour copy fades in over the tint as a matching grayscale first, - then un-grays to full colour, so the transition never mixes the tint - hue with the artwork hue. */ + /* The colour copy fades straight in over the static tint, so WebKit + never recomposites the blend group during the transition. */ .disc :global(img.reveal) { position: absolute; inset: 0; z-index: 1; opacity: 0; - filter: grayscale(1); transition: - opacity 0.5s var(--ease) 0.4s, - filter 0.4s var(--ease), + opacity 0.5s var(--ease), transform 0.7s var(--ease); } @@ -174,12 +171,7 @@ const Tag = href ? "a" : "div"; .circle:is(:hover, :focus-visible) .disc :global(img.reveal) { opacity: 1; - filter: none; transform: scale(1.08); - transition: - opacity 0.5s var(--ease), - filter 0.4s var(--ease) 0.5s, - transform 0.7s var(--ease); } .circle:is(:hover, :focus-visible) .name { @@ -221,17 +213,12 @@ const Tag = href ? "a" : "div"; .disc :global(img.reveal) { transition: - opacity 0.3s linear 0.3s, - filter 0.3s linear, + opacity 0.3s linear, transform 0.01s linear; } .circle:is(:hover, :focus-visible) .disc :global(img.reveal) { transform: none; - transition: - opacity 0.3s linear, - filter 0.3s linear 0.3s, - transform 0.01s linear; } }