CKTIS / CSS
scroll-padding-block-end — block-end viewing inset
The scroll-padding-block-end property insets the block-end edge of a scroll container’s optimal viewing region. It is logical: the physical edge depends on the writing mode.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
scroll-padding-block-end: auto | <length-percentage [0,∞]>;scroll-padding-block-end sets an inward offset for a scroll container’s optimal viewing region. It affects alignment during scrolling, even without scroll snapping enabled. It does not add ordinary padding or change content layout.
It accepts auto or a nonnegative length or percentage. Percentages refer to the scrollport’s block-axis dimension. The initial auto leaves the choice to the browser, usually yielding 0px. The property is not inherited; negative values are invalid.
The edge is logical, not always the bottom: with writing-mode: horizontal-tb it is the bottom, with vertical-rl the left, and with vertical-lr the right. Set the property on the scroll container, not the target element.
Examples
<!doctype html>
<meta charset="utf-8">
<style>
#scroller {
writing-mode: horizontal-tb;
height: 200px;
width: 240px;
overflow: auto;
scroll-padding-block-end: 40px;
}
.spacer { height: 300px; }
#target { height: 40px; background: lightblue; }
</style>
<div id="scroller" tabindex="0">
<div class="spacer"></div>
<div id="target">Target</div>
<div class="spacer"></div>
</div>
<pre id="result"></pre>
<script>
const scroller = document.querySelector('#scroller');
const target = document.querySelector('#target');
target.scrollIntoView({ block: 'end', behavior: 'instant' });
document.querySelector('#result').textContent = scroller.scrollTop;
</script>Result
180
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.