Skip to content

[css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target #11360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions css-scroll-snap-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Motivating Examples {#examples}
overflow-inline: auto;
}
.carousel .origin {
scroll-start-target: auto;
scroll-initial-target: nearest;
}
</pre>

Expand All @@ -103,7 +103,7 @@ Motivating Examples {#examples}
}

main {
scroll-start-target: auto;
scroll-initial-target: nearest;
}
</pre>

Expand Down Expand Up @@ -131,15 +131,19 @@ Motivating Examples {#examples}
Setting Where Scroll Starts {#properties-on-the-scroll-container}
=================================================================

The 'scroll-start-target' property {#scroll-start-target}
The 'scroll-initial-target' property {#scroll-initial-target}
-------------------------------------------

ISSUE(11173): The name "scroll-initial-target" is chosen as the least worst option
which expresses that it should be scrolled to when its scroll container
first shows up on the page. A better name for the property would be very much welcome.

<h4 dfn export id="initial-scroll-target">
Initial scroll target</h4>

The [=initial scroll target=] of a <a>scroll container</a> |scrollcontainer|
is an element or pseudo-element
whose 'scroll-start-target'property is non-''scroll-start-target/none''
whose 'scroll-initial-target'property is non-''scroll-initial-target/none''
and whose nearest <a>scroll container</a> is |scrollcontainer|.
When multiple such elements or pseudo-elements exist,
user-agents should select the one
Expand All @@ -163,11 +167,11 @@ Initial scroll target</h4>
</div>


<h4 id="scroll-start-target-propdef">scroll-start-target Property Definition</h4>
<h4 id="scroll-initial-target-propdef">scroll-initial-target Property Definition</h4>

<pre class="propdef">
Name: scroll-start-target
Value: none | auto
Name: scroll-initial-target
Value: none | nearest
Initial: ''none''
Applies to: all elements
Inherited: no
Expand All @@ -176,23 +180,23 @@ Initial scroll target</h4>
Animation type: none
</pre>

<dl dfn-type=value dfn-for="scroll-start-target">
<dl dfn-type=value dfn-for="scroll-initial-target">
<dt><dfn>none</dfn>
<dd>The element is not an [=initial scroll target=].
<dt><dfn>auto</dfn>
<dt><dfn>nearest</dfn>
<dd>The element is potentially an [=initial scroll target=]
for its nearest [=scroll container=] ancestor.
</dl>

<h4 id="scroll-start-target-with-place-content">
<h4 id="scroll-initial-target-with-place-content">
Interaction with 'place-content'</h4>

If a [=scroll container's=] [=initial scroll position=]
is potentially set by both a [=content-distribution property=]
and by 'scroll-start-target' on a descendant,
'scroll-start-target' wins.
and by 'scroll-initial-target' on a descendant,
'scroll-initial-target' wins.

<h4 id="scroll-start-target-fragment-navigation">
<h4 id="scroll-initial-target-fragment-navigation">
Post-first layout arrivals</h4>

While the document is being [[html#updating-the-document|updated]],
Expand Down