-
Notifications
You must be signed in to change notification settings - Fork 682
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
[css-scroll-snap-2] scroll-start-target: auto doesn't match general meaning of auto #11173
Comments
FYI @flackr, @argyleink |
time to bikeshed! lol. I do think a different value is better. options?
|
Since we have ideas that we might try to include all scroll-start-targets, we could consider something like Or, we could consider other values we may want to eventually support. E.g. if we wanted to eventually have options that align with / explain scrolling to a fragment, we could consider what the names might be if we want to describe the ways that this is currently different from that and/or if we eventually wanted to be able to specify a scroll that was roughly equivalent to scrolling to a fragment. In particular, scrolling to a fragment:
|
Thanks @argyleink & @flackr, I like these suggestions.
I think it would be nice to keep these options open so I wonder if we could simply replace We would also be able to, in the future, expand the syntax to address both questions, i.e. have
where |
It's also been pointed out that within CSS it might be very common to assosciate
It probably makes sense to talk about the name of the property before talking about what keywords are appropriate. |
i like |
Wouldn't |
I agree with @johannesodland. I think we should try to use terminology that either conveys initial scroll position or something from the html spec try to scroll to the fragment. |
I also agree, but I felt since scroll origin is more of a spec detail rather than an API exposed to developers, it wouldn't be much of a concern. But maybe some future property might use "scroll-origin-*" in a way that aligns with scroll origin so it would be better to avoid that potential source of confusion if we can. I've also thought of
To be clear I'm not proposing we adopt all these names right away, but that |
Thinking about this a little more, perhaps Firstly for the property name, I think options we should consider are:
between which my preference is for Then, for the property values, I think we should consider:
among which my preference would be |
I like |
Related to the property name discussion: #10913 |
I think the interesting question is, what happens if you set this property via the CSSOM? |
You mean, if you call Assuming we follow the fragment scrolling model https://html.spec.whatwg.org/#try-to-scroll-to-the-fragment , I suppose there is an argument to say until the user does some scrolling in the box it perhaps should result in updating the scroller since it still doesn't have a user indicated position. Do we do this for changes to |
@DavMila pointed out that the initial scroll position is used until you scroll, so i think in either case if the user hasn't scrolled the scrolling container it would update its scroll position to the target per https://www.w3.org/TR/css-overflow-3/#initial-scroll-position . Note I'm going by the spec since it seems like browsers don't do anything to keep your scroll position if you have scrolled today: https://codepen.io/flackr/pen/QwLEoPL |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> DavidA: scroll-start-target is set on the child of a scrollable container, that makes the container initiall scroll to that child<TabAtkins> DavidA: got feedback from the TAG that, looking at the name of the property, the -start could be confusing (it's a logical direction in other properties) <TabAtkins> DavidA: also the values are none|auto, was a question about -- currently auto means the element is a scroll-start target, but "auto" usually is used for something more magical <TabAtkins> DavidA: so we're lookign for a repalcement value name <TabAtkins> DavidA: for property name, scroll-container-target and initial-scroll-target are my suggestions. suggest the second one <TabAtkins> (yeah, I like initial-scroll-target) <TabAtkins> DavidA: for the values, i'm proposing `none | local`. proposing local because it only effects the nearest scroll container. <TabAtkins> DavidA: in theory, in future we could expand the scope of the scrolling target, add "global" or something <TabAtkins> flackr: the thinking is that a value which scrolls all ancestors could explain fragment navigation - that does scroll all scrollers up to the root <astearns> ack rachelandrew <astearns> ack fantasai <TabAtkins> (i think i'd prefer something like "self") <fantasai> https://drafts.csswg.org/scroll-animations-1/#scroll-notation <TabAtkins> fantasai: we have scroll() from Scroll Animations. It uses the keyword "nearest", we should be consistent with that <TabAtkins> +1 <rachelandrew> sorry was muted, yes was just leftover from before <TabAtkins> fantasai: for property name, would it make sense to put "scroll" first, so scroll-initial-target? <TabAtkins> DavidA: I think scroll-initial-target is fine too <TabAtkins> flackr: or overflow-initial-target, since most other scorlling properties are overflow <TabAtkins> fantasai: we have a lot of scroll-* prefixes, scroll-padding, scroll-snap, etc <TabAtkins> flackr: fair, i do like it being grouped with other scrollers. tho it does go on the child rather than the scroll container <TabAtkins> fantasai: also several scroll-* properties that are, like scroll-margin <TabAtkins> fantasai: I do think these names are better, but we're not clearly managing that this is set on the item <TabAtkins> fantasai: I think scroll-margin and scroll-snap-align are a little bit indicative, but my initial impression from the property name is it's set on the scroll container, and takes some reference to a child <TabAtkins> (I think scroll-initial-target is reasonably child-indicative. not 100%, but doable) <TabAtkins> DavidA: I was thinking scroll-container-target, but not sure if that helps <TabAtkins> astearns: i think we're converging, at least for now, on scroll-initial-target. might come up with something better <TabAtkins> astearns: shall we resolve on that? <TabAtkins> +1 <bramus> +1 on nearest <TabAtkins> fantasai: and none|nearest for values? <TabAtkins> DavidA: yeah <TabAtkins> astearns: so proposed is `scroll-initial-target: none | nearest` <TabAtkins> astearns: objections? <TabAtkins> RESOLVED: `scroll-initial-target: none | nearest` <argyle> 👍🏻 <TabAtkins> fantasai: can we have a comment soliciting better ideas? <TabAtkins> astearns: specifically about something tha tmight more obviously indicate that it's on the child <TabAtkins> DavidA: i can write something |
In line the CSS working group's resolution[1], this renames the "scroll-start-target" property to "scroll-initial-target" and replaces its keyword "auto" with "nearest." [1] w3c#11173 (comment)
In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4
In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395987}
In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395987}
This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf
This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf
This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396242}
This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396242}
This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396242}
…et (#11360) In line the CSS working group's resolution[1], this renames the "scroll-start-target" property to "scroll-initial-target" and replaces its keyword "auto" with "nearest." [1] #11173 (comment)
…target to scroll-initial-target, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395987} -- wpt-commits: 24f3b8dce40e1e767c7e6bf1568a7c30b0c24b21 wpt-pr: 49678
…tart-target to scroll-initial-*, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename WPTs scroll-start-target to scroll-initial-* This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686
…target to scroll-initial-target, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395987} -- wpt-commits: 24f3b8dce40e1e767c7e6bf1568a7c30b0c24b21 wpt-pr: 49678
…tart-target to scroll-initial-*, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename WPTs scroll-start-target to scroll-initial-* This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686
…target to scroll-initial-target, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <skobeschromium.org> Commit-Queue: David Awogbemila <awogbemilachromium.org> Cr-Commit-Position: refs/heads/main{#1395987} -- wpt-commits: 24f3b8dce40e1e767c7e6bf1568a7c30b0c24b21 wpt-pr: 49678 UltraBlame original commit: 7ba193e19f4ec3804cd1beaa2b7afd09d9e50112
…tart-target to scroll-initial-*, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename WPTs scroll-start-target to scroll-initial-* This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <skobeschromium.org> Commit-Queue: David Awogbemila <awogbemilachromium.org> Cr-Commit-Position: refs/heads/main{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686 UltraBlame original commit: df073a771ff0864df0141358cf5ac2b7fefde157
…target to scroll-initial-target, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <skobeschromium.org> Commit-Queue: David Awogbemila <awogbemilachromium.org> Cr-Commit-Position: refs/heads/main{#1395987} -- wpt-commits: 24f3b8dce40e1e767c7e6bf1568a7c30b0c24b21 wpt-pr: 49678 UltraBlame original commit: 7ba193e19f4ec3804cd1beaa2b7afd09d9e50112
…tart-target to scroll-initial-*, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename WPTs scroll-start-target to scroll-initial-* This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <skobeschromium.org> Commit-Queue: David Awogbemila <awogbemilachromium.org> Cr-Commit-Position: refs/heads/main{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686 UltraBlame original commit: df073a771ff0864df0141358cf5ac2b7fefde157
…target to scroll-initial-target, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <skobeschromium.org> Commit-Queue: David Awogbemila <awogbemilachromium.org> Cr-Commit-Position: refs/heads/main{#1395987} -- wpt-commits: 24f3b8dce40e1e767c7e6bf1568a7c30b0c24b21 wpt-pr: 49678 UltraBlame original commit: 7ba193e19f4ec3804cd1beaa2b7afd09d9e50112
…tart-target to scroll-initial-*, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename WPTs scroll-start-target to scroll-initial-* This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <skobeschromium.org> Commit-Queue: David Awogbemila <awogbemilachromium.org> Cr-Commit-Position: refs/heads/main{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686 UltraBlame original commit: df073a771ff0864df0141358cf5ac2b7fefde157
…target to scroll-initial-target, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename scroll-start-target to scroll-initial-target In line with the CSS working group's resolution[1] to rename scroll-start-target to scroll-initial-target and its keyword auto to nearest, this patch updates Blink's implementation. This patch only does the rename on the code in the relevant files. A follow-up patch will rename the relevant files. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I8ec8ab8fbd994f3f737d7c1d6a40af015fc6d2d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088389 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1395987} -- wpt-commits: 24f3b8dce40e1e767c7e6bf1568a7c30b0c24b21 wpt-pr: 49678
…tart-target to scroll-initial-*, a=testonly Automatic update from web-platform-tests [css-scroll-snap-2] Rename WPTs scroll-start-target to scroll-initial-* This completes chromium's adoption of the CSS working group's resolution[1] to rename scroll-start-target scroll-initial-target. [1] w3c/csswg-drafts#11173 (comment) Bug: 40909052 Change-Id: I9aa6717334432098e108c05351bb8446225fc3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089989 Reviewed-by: Steve Kobes <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686
The
scroll-start-target
spec specifies 2 keywords for thescroll-start-target
property:none
, meaning: this element is not to be used to determine the initial scroll position of its nearest scroll container, andauto
, meaning: this element should be used to determine the initial scroll position of its nearest scroll container.The use of
auto
in this way is a bit of a departure from whatauto
means in CSS, i.e. "the UA should do what it thinks is best."Should we change
auto
to a different keyword? Here are a few we could consider:on-first-appearance
oralign
oractive
orvisible
. My preference would bealign
.The text was updated successfully, but these errors were encountered: