-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functions
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When using cdk-virtual-scroll-viewport with *cdkVirtualFor, items are sometimes rendered with visible gaps between rows. This seems to be caused by subpixel rounding when calculating item offsets.

Reproduction
StackBlitz link:
Steps to reproduce:
- Set a solid background color for the cdk-virtual-scroll-viewport.
- Set a different background color for each item rendered with *cdkVirtualFor.
- Zoom the browser window (e.g. 300%) and scroll quickly through the list.
Expected Behavior
Rows should be rendered continuously without visible gaps between them.
Actual Behavior
At certain scroll positions or zoom levels, a thin gap (about 0.5px) appears between consecutive rows.
Environment
Angular: 20.2.2
Angular CDK: 20.2.2
Browser: Chrome 139, Edge 139 (Windows 10, macOS tested)
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functions