scroll-padding-bottom

Sets the bottom padding of a scroll container to adjust scroll snap positions. Prevents a fixed bottom bar from obscuring content.

Class List

Pattern: spb{value}{unit}

ClassCSSDescription
spb0scroll-padding-bottom: 0No scroll padding
spb8pxscroll-padding-bottom: 8px8px padding
spb16pxscroll-padding-bottom: 16px16px padding
spb2remscroll-padding-bottom: 2rem20px padding
spb4remscroll-padding-bottom: 4rem40px padding
spb6remscroll-padding-bottom: 6rem60px padding

Usage Examples

<!-- Page with fixed bottom bar -->
<div class="spb6rem oya h100vh">
  <section id="s1">Section 1</section>
  <section id="s2">Section 2</section>
</div>
<footer class="pf b0 l0 w100p h6rem bg18181B">
  Bottom navigation
</footer>

<!-- Mobile bottom tab bar compensation -->
<main class="spb8rem oya">
  Content is not obscured by the bottom tab bar.
</main>