Skip to content

Commit fa58903

Browse files
fix(registry): work around CDP subpixel capture artifact
The renderer's Page.captureScreenshot can introduce a 1-2px offset at viewport boundaries due to compositor subpixel rounding. Grid rows are now 341px (3×341 + 2×30 = 1083), overflowing the 1080 viewport by 3px. The overflow is clipped by overflow: hidden, but ensures any capture offset still sees grid content rather than the body background. Also removed flex centering from .demo-canvas — unnecessary now that the grid fills the viewport, and it was a source of non-deterministic positioning under multi-worker rendering. Co-authored-by: Kanyini <onebenson@gmail.com>
1 parent f0b0b97 commit fa58903

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

registry/components/parallax-unzoom/demo.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,12 @@
3232
height: 1080px;
3333
position: relative;
3434
overflow: hidden;
35-
display: flex;
36-
align-items: center;
37-
justify-content: center;
3835
}
3936

4037
.parallax-unzoom-grid {
4138
display: grid;
4239
grid-template-columns: repeat(5, 360px);
43-
grid-template-rows: repeat(3, 340px);
40+
grid-template-rows: repeat(3, 341px);
4441
gap: 30px;
4542
}
4643

registry/components/parallax-zoom/demo.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,12 @@
3232
height: 1080px;
3333
position: relative;
3434
overflow: hidden;
35-
display: flex;
36-
align-items: center;
37-
justify-content: center;
3835
}
3936

4037
.parallax-zoom-grid {
4138
display: grid;
4239
grid-template-columns: repeat(5, 360px);
43-
grid-template-rows: repeat(3, 340px);
40+
grid-template-rows: repeat(3, 341px);
4441
gap: 30px;
4542
}
4643

0 commit comments

Comments
 (0)