-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Add CSS scroll-timeline* properties #21277
Conversation
Preview URLs (8 pages)
Flaws (6)Note! 5 documents with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
(this comment was updated 2022-10-10 03:35:54.999679) |
@@ -88,12 +107,9 @@ A scroll timeline named `squareTimeline` is declared and applied to the `#square | |||
animation-duration: 3s; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear why you need animation-duration
when a timeline is provided by the scrollbar. But in FF at least it does not rotate without this.
@@ -12,7 +12,10 @@ tags: | |||
browser-compat: css.at-rules.scroll-timeline | |||
--- | |||
|
|||
{{CSSRef}}{{Non-standard_header}}{{Deprecated_header}} | |||
{{CSSRef}}{{Deprecated_header}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just delete this document altogether? It is implemented in chrome so people might be using it, but it is non standard and will shortly be superseded on all platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can still keep it around until 'scroll-timeline' property becomes default in two browsers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'm in two minds. The argument to remove is that this is non standard, deprecated, and the result of a removed draft specification - i.e. should never have been in the wild. The argument to keep is that it is in chrome. Perhaps a compromise would be when the proper API is in one browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these updates, @hamishwillee! Just a few minor suggestions.
@@ -12,7 +12,10 @@ tags: | |||
browser-compat: css.at-rules.scroll-timeline | |||
--- | |||
|
|||
{{CSSRef}}{{Non-standard_header}}{{Deprecated_header}} | |||
{{CSSRef}}{{Deprecated_header}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can still keep it around until 'scroll-timeline' property becomes default in two browsers?
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
A `<scroll-timeline-name>` value followed by a `<scroll-timeline-axis>` value may be applied to the container element in any order. | ||
At least one value must be applied. | ||
|
||
Allowed values for `<scroll-timeline-name>` are: | ||
|
||
- `none` | ||
- : The timeline has no name. | ||
- `<custom-ident>` | ||
- : An arbitrary custom identifier that can be used to reference the scroll timeline in an [`animation-timeline`](/en-US/docs/Web/CSS/animation-timeline). | ||
Possible values are described in [`<custom-ident>`](/en-US/docs/Web/CSS/custom-ident). | ||
|
||
The `<scroll-timeline-axis>` indicates which scrollbar axis, in the element identified by `<scroll-timeline-name>`, provides the scroll timeline. | ||
Allowed values are: | ||
|
||
- `block` | ||
- : (Default) Scrollbar in the block axis of the scroll container. | ||
The block axis is the direction perpendicular to the flow of text within a line. | ||
For horizontal writing modes like standard English this is the same as `vertical`, while for vertical writing modes it is the same as `horizontal`. | ||
- `inline` | ||
- : Scrollbar in the inline axis of the scroll container. | ||
The inline axis is the direction parallel to the flow of text in a line. | ||
For horizontal writing modes this is the same as `horizontal`, while for vertical writing modes this is the same as `vertical`. | ||
- `vertical` | ||
- : Scrollbar in the vertical axis of the scroll container. | ||
- `horizontal` | ||
- : Scrollbar in the horizontal axis of the scroll container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. That makes sense. Does this work for you?
A `<scroll-timeline-name>` value followed by a `<scroll-timeline-axis>` value may be applied to the container element in any order. | |
At least one value must be applied. | |
Allowed values for `<scroll-timeline-name>` are: | |
- `none` | |
- : The timeline has no name. | |
- `<custom-ident>` | |
- : An arbitrary custom identifier that can be used to reference the scroll timeline in an [`animation-timeline`](/en-US/docs/Web/CSS/animation-timeline). | |
Possible values are described in [`<custom-ident>`](/en-US/docs/Web/CSS/custom-ident). | |
The `<scroll-timeline-axis>` indicates which scrollbar axis, in the element identified by `<scroll-timeline-name>`, provides the scroll timeline. | |
Allowed values are: | |
- `block` | |
- : (Default) Scrollbar in the block axis of the scroll container. | |
The block axis is the direction perpendicular to the flow of text within a line. | |
For horizontal writing modes like standard English this is the same as `vertical`, while for vertical writing modes it is the same as `horizontal`. | |
- `inline` | |
- : Scrollbar in the inline axis of the scroll container. | |
The inline axis is the direction parallel to the flow of text in a line. | |
For horizontal writing modes this is the same as `horizontal`, while for vertical writing modes this is the same as `vertical`. | |
- `vertical` | |
- : Scrollbar in the vertical axis of the scroll container. | |
- `horizontal` | |
- : Scrollbar in the horizontal axis of the scroll container. | |
A `<scroll-timeline-name>` value followed by a `<scroll-timeline-axis>` value may be applied to the container element in any order. | |
At least one value must be applied. | |
Allowed values are: | |
- `<scroll-timeline-name>` | |
- : The name used to identify the timeline. | |
See [`scroll-timeline-name`](/en-US/docs/Web/CSS/scroll-timeline-name). | |
- `<scroll-timeline-axis>` | |
- : The axis of the element that provides the scrollbar used for the timeline. | |
The default is the scrollbar in the block axis. | |
See [`scroll-timeline-axis`](/en-US/docs/Web/CSS/scroll-timeline-axis). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is much better. Thank you :)
Hi @dipikabh Thanks for your thorough review - more than just a "few" suggestions :-) Much appreciated. I have accepted most of them. Just one open issue my side as a result of your comments: https://github.com/mdn/content/pull/21277/files#r990857875 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks a lot! 👍
FF103 added support for the following CSS properties behind a pref
layout.css.scroll-linked-animations.enabled
:This adds documentation. I am also updating related docs like animation-timeline to purge
@scroll-timeline
at-rule, which this replaces and which is not part of the spec.Note that this requires preferences to be set in chrome and in FF to work. I'll look at BCD next so that will become obvious.
Other docs work can be tracked in #21069