scroll-margin-bottom

Adds margin below an element when scrolling via anchor links. Used to prevent scroll targets from being obscured by a fixed footer.

Class List

Pattern: smb{value}{unit}

ClassCSSDescription
smb0scroll-margin-bottom: 0No scroll margin
smb8pxscroll-margin-bottom: 8px8px margin
smb16pxscroll-margin-bottom: 16px16px margin
smb2remscroll-margin-bottom: 2rem20px margin
smb4remscroll-margin-bottom: 4rem40px margin

Usage Examples

<!-- Correct scroll target when fixed footer exists -->
<section id="bottom-section" class="smb6rem">
  <p>Add bottom margin so it is not obscured by the fixed footer (60px)</p>
</section>

<!-- Bottom margin in vertical scroll snap -->
<div class="smb2rem bg18181B p2rem br8px">
  Reserve extra space below snap point
</div>