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:
+2
-2
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user