fix: simplify zoom to prevent empty space issues

The viewport-centered zoom approach was creating empty space above
the content when zooming to 50%, causing the CV to move down.

Solution: Simple top-anchored zoom
- Removed all complex scroll compensation logic
- Set transform-origin to "top center" (fixed position)
- Page now scales naturally from the top without movement
- No dynamic transform-origin calculations
- No scroll position adjustments

Result:
- Page stays anchored at top during zoom
- No empty space created above content
- Clean, predictable zoom behavior
- Works correctly at all zoom levels (50%-200%)

The page simply scales up/down from the top center point,
maintaining its position without any jumping or space issues.
This commit is contained in:
juanatsap
2025-11-12 12:03:01 +00:00
parent fce7d7b27e
commit b5d0d8389b
2 changed files with 6 additions and 32 deletions
+2 -2
View File
@@ -551,8 +551,8 @@ iconify-icon {
min-height: auto; /* Changed from 100vh */
/* Zoom transform properties */
transform-origin: center center; /* Default origin, dynamically updated by JS to viewport center */
transition: transform 0.08s linear, transform-origin 0s; /* Smooth zoom, instant origin change */
transform-origin: top center; /* Scale from top center - page stays anchored at top */
transition: transform 0.08s linear; /* Smooth, immediate zoom response */
will-change: transform; /* Hint browser to optimize for transforms */
}