-
Notifications
You must be signed in to change notification settings - Fork 719
[css-scroll-snap-2] scroll-start-target: auto doesn't match general meaning of auto #11173
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
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 |
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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila 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 KobesCommit-Queue: David Awogbemila Cr-Commit-Position: refs/heads/main@{#1396242} -- wpt-commits: fd8bb33ca2493b086c7b92731aadcb9fc91fb947 wpt-pr: 49686
Uh oh!
There was an error while loading. Please reload this page.
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: