Skip to content

fix(studio): keep the tilted hero member cards sharp - #337

Merged
wab merged 4 commits into
mainfrom
cc/studio-hero-blur-af12ac
Nov 17, 2026
Merged

wab merged 4 commits into
mainfrom
cc/studio-hero-blur-af12ac

Conversation

@wab

@wab wab commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Why

The member cards that scroll at the top of /studio look blurry: soft names, soft photos. Reported by Morgane.

Cause

The scroll animation runs on transform, so Chrome puts each row on its own GPU layer. That layer is drawn flat. The compositor then resamples it twice: once for the parent's rotate(-3deg) tilt, and once for the sub-pixel step of the slide. Both resamplings blur text and photos.

Measured on the dev server with headless Chrome. The score is the mean squared luminance gradient over the same crop at the same animation time (higher is sharper):

Variant (before the fix) DPR 1 DPR 2
As shipped 237 157
Animation paused 280 158
Rotation removed 338 217
Edge fade masks removed 247 152
Same position, no GPU layer (painted with the page) 505 269
  • Pausing barely helps: the layer stays when the animation is paused.
  • Removing the rotation helps a little: the sub-pixel slide still resamples the layer.
  • The masks are not a factor.
  • Photo resolution is not a factor: the sources are 512 to 600px for an 82px circle.
  • Removing the layer gives the full sharpness. The GPU layer under a rotated parent is the cause.

Fix

MarqueeTrack gets an opt-in painted prop. A painted track moves through left instead of transform. The browser repaints left each frame inside the rotated space, so text and photos are drawn at their final angle and stay sharp. A w: max wrapper sits around the track so that the left percentage refers to the track width, as translateX did.

  • The hero rows use painted. The tilt, the fades and the two opposite rows are unchanged.
  • The companies strip keeps the GPU slide: it is not rotated.
  • preset/ gains one keyframe and one token (marquee-ultra-slow-painted). They are additive, and only the studio hero uses them.

After the fix: 502 / 270 as shipped, 501 / 270 paused, which matches the no-layer ceiling.

Before and after (DPR 2, same frame)

Before After
before after
DPR 1
Before After
before after

The screenshots live on the pr-assets/studio-hero-blur branch. Delete it once this PR is merged.

Cost of repainting

Repainting two rows each frame was measured on the dev build:

  • Desktop 1440x900, DPR 2: 60 fps, p95 frame 17ms, no long animation frame.
  • Phone 390x844, DPR 3, CPU throttled 4x: same results.

Hover, as in the mockup

The equipe mockup lifts a card on hover. The hero cards now lift 6px and tilt 1deg more, over the slow duration. They take no shadow: the row clips its overflow, so a shadow was cut off below the card. The rows gained 12px of vertical padding so a lifted card is not clipped. The spacing between and around the rows stays at 24px.

Before After
before after

Under reduced motion the card does not move.

Reduced motion

Unchanged. Same group box, the same 18 cards in a flat wrapping grid at the same positions, no animation, pause button hidden. The before and after captures look identical.

Checks

  • pnpm check && pnpm typecheck
  • pnpm test:run app/components/studio
  • Code review of the branch diff. Fixed: the hover transform now sits under _motionSafe instead of being reset under _motionReduce, and the painted keyframe moves by an exact third (calc(-100% / 3)). Left open, for the reviewer to judge:
    • The rows keep repainting while the hero is off screen. The throttled phone run above shows no dropped frame. Pausing them with an IntersectionObserver would be a follow-up.
    • During the 300ms hover lift, Chrome briefly gives the card its own GPU layer, so the card can soften until the lift ends. It is sharp at rest.
    • On a touch screen, a tap leaves the card lifted until the next tap elsewhere, as in the mockup.
  • J1 checklist on the Vercel preview, since preset/ changed. Only /studio and /en/studio use the new token. Rows to add under Studio:
    • Hero member cards: sharp while scrolling and when paused (FR-D, FR-M, EN-D, EN-M)
    • Hero member cards: lift and tilt on hover, not clipped by the row
    • Companies strip: scrolls as before

wab added 3 commits November 17, 2026 14:31
The hero member rows scrolled through a transform animation. The browser
then draws each row once into a GPU layer, flat, and the compositor
rotates it by 3 degrees and shifts it by fractions of a pixel at every
frame. Both steps resample the bitmap, which blurs names, roles and
photos. Pausing did not help: the layer stays while the animation exists.

The hero rows now move through `left`, on a new
`marquee-ultra-slow-painted` keyframe: the browser repaints them each
frame inside the rotated space, with no layer to resample. Same speed,
same path, same tilt and fades. `MarqueeTrack` takes this mode through a
`painted` prop, so the companies strip keeps its GPU slide.
On hover, a card rises by 6px, tilts by one more degree and takes the
`hover` shadow, over the `slow` duration (mockup `equipe`). Under reduced
motion, only the shadow changes.

Each row clips its overflow, so the space between the rows moves from the
column gap into padding on each row list. Rows and cards keep the same
24px spacing.
The hover lift sits under motion-safe instead of a reduced-motion reset,
and the painted keyframe moves by an exact third so the loop has no seam.
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website Ready Ready Preview Nov 17, 2026 1:56pm UTC

Request Review

The row clips its overflow, so the shadow was cut off below the card.
The lift and the tilt carry the hover on their own.
@wab
wab merged commit e0eb448 into main Nov 17, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 9ed258df Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant