Skip to content

Commit 507aa45

Browse files
mlaetitiaclaude
andcommitted
Bring the full-size logo back on an upward scroll on mobile
#240 merged the mobile and desktop scroll paths into one absolute threshold, which dropped the behaviour production has below 785px: the full-size logo returns on any upward scroll rather than only at the top of the page. The partner asked for production's behaviour to be kept. Three cases could leave the logo stuck small. The handler runs once per animation frame, so a single frame can swallow a whole flick, and recording the turning point where the frame landed rather than at the peak it turned from made the restore unreachable after a back-to-top jump, a hard flick up from just below the fold, or iOS overscroll reporting a negative position. It now records the peak, clamps the position at zero, and clears the peak on the wide path so a rotation cannot carry a stale one. matchMedia replaces the innerWidth read, so crossing 784px re-decides instead of waiting for the next scroll event. No CSS changed. The bar keeps its height at every width, so the logo row and the menu button stay where they are. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rCHPCdbV5C5dDJjEmMDuy
1 parent 961306b commit 507aa45

3 files changed

Lines changed: 39 additions & 7 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => '6cdacd840462a5c6d505');
1+
<?php return array('dependencies' => array(), 'version' => '1768336b7b2ec73f9a1a');

0 commit comments

Comments
 (0)