In a horizontal writing mode that usually means top and bottom. It is not inherited. Both longhands start at 0. Pair it with scroll-snap-type on the container and scroll-snap-align on the target.
Logical shorthand.
Standard-track and Baseline Widely available. Prefer it over physical top/bottom margins when the layout may switch writing mode. It accepts lengths only — not percentages.
The formal syntax is lengths only. Use px, rem, or em — not %.
vs
Not the same as scroll-padding-block
scroll-padding-block insets the scroll container’s snapport. scroll-margin-block expands the target’s snap area.
axis
Block follows writing mode
In vertical writing modes the block axis is horizontal, so this property offsets left/right instead of top/bottom.
edge
Only the snapped edge feels obvious
If you snap to end, the end margin is what you notice. Setting only that longhand is often enough.
Compatibility
Browser Support
scroll-margin-block is a browser layout property for scroll snap. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since 2021
scroll-margin-block
Chrome 69+, Firefox 68+, Safari 15+, Edge 79+, Opera 56+, Samsung Internet 10.1+. Internet Explorer does not support it.
97%Modern browsers
Google Chrome69+
Full support
Mozilla Firefox68+
Full support
Apple Safari15+
Full support
Microsoft Edge79+
Full support
Opera56+
Full support
Samsung Internet10.1+
Full support
Internet ExplorerNo support
Not supported
scroll-margin-blockWidely supported
Bottom line: Safe for modern scroll-snap UIs. Skip Internet Explorer. Pair with scroll-snap-type and scroll-snap-align or the offset will not show.
Remember
Key Takeaways
Role: shorthand for block-start and block-end scroll margins on a snap target.
Values: one length for both sides, or two lengths for start then end.
Initial value:0 on both longhands. Not inherited. No percentages.
Tip: use scroll-padding-block on the container when you want to inset the snapport instead.
One line:scroll-margin-block gives a snap target breathing room on the block axis — after scroll snap is already set up.
Frequently Asked Questions
It is a shorthand that sets scroll margins on the block axis — scroll-margin-block-start and scroll-margin-block-end. Those outsets enlarge the scroll snap area so snapping stops a little before or after the element's edge.
Both longhands default to 0. There is no extra outset until you set one.
It mainly affects scroll snapping. You still need a scroll container with scroll-snap-type and snap targets with scroll-snap-align for the offset to show during snap scrolling.
scroll-margin-block is set on the snap target (the child). scroll-padding-block is set on the scroll container and insets the snapport itself.
No. Set it on the element that snaps. Percentages are not valid; use lengths such as px, rem, or em.
It is Baseline and widely available since September 2021: Chrome 69+, Firefox 68+, Safari 15+, Edge 79+, Opera 56+. Internet Explorer does not support it. It is a browser layout property, not a Node.js feature.