Goal
Keep a hard layout boundary (no scrolling) while allowing a small decorative effect — a shadow, glow, or focus ring — to paint past the edge.
What to use
If the overflowing pixels are purely decorative and the element should never become a scrolling surface, use overflow: clip on the container and add a small overflow-clip-margin. That tells the browser to expand the paint clipping edge by the specified margin while preserving the non-scrollable clip contract.
Expected behavior
The container remains non-scrollable: programmatic scrollTop changes still have no effect.
Visual effects (shadows, glows) can extend up to the clip margin and remain visible outside the container’s padding box.
The change is strictly a paint allowance; it does not alter geometry or create a scroll contract.
When not to use it
Don’t use this combination when the clipped content is interactive or required for accessibility.…