Add "auto" to ScrollLogicalPosition per https://github.com/w3c/csswg-drafts/issues/9576. Fragment navigation now passes WhereToScroll::Auto so that scroll-snap-align is respected when present, falling back to the spec defaults (start for block, nearest for inline) when absent. Explicit scrollIntoView() alignment values are no longer overridden by snap alignment. GetScrollSnapAlignFor previously returned None for all axes when the scroll container had scroll-snap-type: none. Remove that early return so that fragment navigation (which uses WhereToScroll::Auto) can still honor the target's scroll-snap-align even on non-snapping containers, as the spec permits. Differential Revision: https://phabricator.services.mozilla.com/D298959
22 lines
428 B
HTML
22 lines
428 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<title>Reference</title>
|
|
<style type='text/css'>
|
|
.container {
|
|
border: solid blue 4px;
|
|
height: 4em;
|
|
overflow: auto;
|
|
font: 20px/1 sans-serif;
|
|
}
|
|
.container > div {
|
|
height: 1em;
|
|
background: green;
|
|
}
|
|
</style>
|
|
|
|
<div id='instructions'>Test passes if there is a green stripe across the first quarter of the box below and no red.</div>
|
|
|
|
<div class="container">
|
|
<div></div>
|
|
</div>
|