Skip to content

Commit 15e92e2

Browse files
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>
1 parent 5637a48 commit 15e92e2

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

registry/components/parallax-unzoom/demo.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
display: grid;
4242
grid-template-columns: repeat(5, 240px);
4343
grid-template-rows: repeat(3, 320px);
44-
gap: 40px;
44+
gap: 24px;
4545
}
4646

4747
.parallax-unzoom-card {
@@ -148,11 +148,10 @@
148148

149149
.parallax-unzoom-grid {
150150
--pu-progress: 0;
151-
--pu-focus-scale: 8;
151+
--pu-focus-scale: 9;
152152
--pu-sibling-push: 900px;
153-
--pu-sibling-fade: 1;
153+
--pu-sibling-fade: 0;
154154
position: relative;
155-
transform-style: preserve-3d;
156155
}
157156

158157
.parallax-unzoom-card {
@@ -298,6 +297,18 @@
298297
0.5,
299298
);
300299

300+
tl.fromTo(
301+
".parallax-unzoom-card:not([data-pu-focus='true'])",
302+
{ opacity: 0 },
303+
{
304+
opacity: 1,
305+
duration: 1.5,
306+
ease: "power2.out",
307+
stagger: { each: 0.02, from: "center" },
308+
},
309+
2.0,
310+
);
311+
301312
tl.to(
302313
".focus-label",
303314
{

registry/components/parallax-unzoom/parallax-unzoom.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
--pu-sibling-push: 900px;
2727
--pu-sibling-fade: 1;
2828
position: relative;
29-
transform-style: preserve-3d;
3029
}
3130

3231
.parallax-unzoom-card {

registry/components/parallax-zoom/demo.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
display: grid;
4242
grid-template-columns: repeat(5, 240px);
4343
grid-template-rows: repeat(3, 320px);
44-
gap: 40px;
44+
gap: 24px;
4545
}
4646

4747
.parallax-zoom-card {
@@ -149,11 +149,10 @@
149149

150150
.parallax-zoom-grid {
151151
--pz-progress: 0;
152-
--pz-focus-scale: 8;
152+
--pz-focus-scale: 9;
153153
--pz-sibling-push: 900px;
154154
--pz-sibling-fade: 1;
155155
position: relative;
156-
transform-style: preserve-3d;
157156
}
158157

159158
.parallax-zoom-card {

registry/components/parallax-zoom/parallax-zoom.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
--pz-sibling-push: 900px;
2828
--pz-sibling-fade: 1;
2929
position: relative;
30-
transform-style: preserve-3d;
3130
}
3231

3332
.parallax-zoom-card {

0 commit comments

Comments
 (0)