mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 16:42:27 +00:00
fix(registry): fix rendering artifacts in parallax-zoom/unzoom demos
- Increase --focus-scale from 8 to 9 — at scale 8 the card matched the viewport width exactly (240×8=1920), leaving zero tolerance for subpixel rounding. Scale 9 overshoots by 240px on each axis. - Reduce grid gap from 40px to 24px — the 1040px grid in a 1080px viewport left only 20px of padding, causing bottom-row cards and their box-shadows to clip at the frame edge. - Remove transform-style: preserve-3d from both snippets — no 3D transforms are used, and preserve-3d can cause compositing artifacts with overflow: hidden ancestors. - Unzoom: set --pu-sibling-fade to 0 and drive sibling opacity via GSAP (starting at t=2.0s). Previously, CSS-driven opacity made cards 70% visible when they first peeked into the viewport, creating colored strips at the frame edge during the reveal. Co-authored-by: Kanyini <onebenson@gmail.com>
This commit is contained in:
+2
-3
@@ -41,7 +41,7 @@
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 240px);
|
||||
grid-template-rows: repeat(3, 320px);
|
||||
gap: 40px;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.parallax-zoom-card {
|
||||
@@ -149,11 +149,10 @@
|
||||
|
||||
.parallax-zoom-grid {
|
||||
--pz-progress: 0;
|
||||
--pz-focus-scale: 8;
|
||||
--pz-focus-scale: 9;
|
||||
--pz-sibling-push: 900px;
|
||||
--pz-sibling-fade: 1;
|
||||
position: relative;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
.parallax-zoom-card {
|
||||
|
||||
Reference in New Issue
Block a user