CKTIS / CSS
view-timeline-inset — timeline visibility boundaries
view-timeline-inset adjusts the visibility region used to calculate a named view timeline’s progress.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
view-timeline-inset: [ [ auto | <length-percentage> ]{1,2} ]#;view-timeline-inset changes a named view timeline’s visibility boundaries, not element layout or clipping. Set it on the tracked element alongside view-timeline-name.
The first value addresses the chosen axis’s start, the second its end; an omitted second value repeats the first. Positive values shrink the region; negative values expand it. Percentages reference the corresponding scrollport dimension. The initial value, auto, uses the corresponding scroll-padding, so it does not unconditionally mean zero.
Commas separate entries for multiple timelines. The property is not inherited. For an anonymous timeline, use the argument to view() rather than expecting this property to configure it.
The example requires local support verification; it has not been executed.
Examples
<!doctype html>
<meta charset="utf-8">
<title>view-timeline-inset</title>
<style>
.scroller {
height: 200px;
overflow-y: scroll;
writing-mode: horizontal-tb;
}
.spacer { height: 400px; }
.subject {
height: 100px;
background: teal;
view-timeline-name: --card;
view-timeline-axis: block;
view-timeline-inset: 20px 40px;
animation: fade linear both;
animation-timeline: --card;
}
@keyframes fade {
from { opacity: 0; }
to { opacity: 1; }
}
</style>
<div class="scroller">
<div class="spacer"></div>
<div class="subject">Subject</div>
<div class="spacer"></div>
</div>Result
Expected in a supporting browser: opacity is 0 at scrollTop = 240, approximately 0.5 at scrollTop = 360, and 1 at scrollTop = 480.
This is a declared geometry result; the recorded review confirms consistency, not browser execution.