From c18831ca5572aa68423ba96be2afb0067326bd4d Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 20 Aug 2026 16:01:04 +1000 Subject: [PATCH] fix: stop first-paint corrections animating, and desensitise the FOUC control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two halves of the same first-paint family. the contents panel; the button that drives it has the identical shape and was untouched. Both lucide icons carry `transition-all` with visibility driven by opacity, and on the pre-app.css frame none of `absolute`, `opacity-0` or `opacity-100` exists while lucide still emits real width/height attributes — so both paint in flow at full opacity. When the stylesheet lands `position` snaps, since it is not animatable, but `opacity` 1 -> 0 animates: a close icon fading out of the toolbar on every static-build navigation. "Back to top" in the page margin has the same shape. Both now withhold the transition until after mount, which makes the correction instant and reserves the animation for real state changes. The toggle's `transition-all` is narrowed to opacity, transform and colour — the three that were ever meant to move; colour is kept explicitly so the icons still ease across a dark-mode toggle rather than snapping. `useMounted` is hoisted out of ContentsSidebar into app/hooks/ so all three sites share one definition. (React #418/#423) and the recovery re-render restores the inlined critical