Skip to content
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] Clarifying scroll-start shorthand values #8766

Closed
DavMila opened this issue Apr 25, 2023 · 4 comments
Closed

[css-scroll-snap-2] Clarifying scroll-start shorthand values #8766

DavMila opened this issue Apr 25, 2023 · 4 comments

Comments

@DavMila
Copy link
Contributor

DavMila commented Apr 25, 2023

The scroll-snap-2 spec includes scroll-start: https://drafts.csswg.org/css-scroll-snap-2/#scroll-start

The spec currently includes “top”, “bottom”, “left” and “right” as valid values for the scroll-start shorthand but only includes “start”, “center”, “end” and “auto” for the scroll-start-{x, y, block, inline} longhands. Are they simply missing or should the shorthand not have these values?

Assuming they are valid values for the shorthand:
I’m not yet sure what “scroll-start: right”, for example, should mean.
Should it mean “Equivalent to scroll-start-x: 100%” in vertical writing modes but have no effect in horizontal writing modes since the first scroll-start value ought to apply to the block axis (vertical in horizontal writing mode) according to the spec?
If this makes sense, shall I create a relevant pull request editing the spec (https://github.com/w3c/csswg-drafts/blob/main/css-scroll-snap-2/Overview.bs)?

@fantasai
Copy link
Collaborator

I don't be believe the content of this draft has been vetted by the CSSWG at all... most of the features in it don't seem to be linked to CSSWG discussions.

I've marked it as an Unofficial Draft for now; we'll need to follow up on this later.

@flackr
Copy link
Contributor

flackr commented May 12, 2023

@fantasai Each of the features have been discussed in the working group as well as the proposed resolution to start an ED:
scroll-start: #6986 (comment)
:snapped, snapChanged and snapChanging : #6985 (comment)

@flackr
Copy link
Contributor

flackr commented May 18, 2023

@DavMila to answer the original question, "left and "right" don't make sense in scroll-start-y right? Similarly "left" and "right" would be valid in scroll-start-inline sometimes, depending on the writing mode. Since the longhands already imply an axis it's simpler to only have values measured on that axis, but the shorthand can imply the appropriate longhands given the writing mode.

@DavMila
Copy link
Contributor Author

DavMila commented Jun 2, 2023

Thanks for clarifying Rob; that makes sense. I think we can close this issue.

@DavMila DavMila closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants