Skip to content

Conversation

@estelle
Copy link
Member

@estelle estelle commented Nov 19, 2025

  • create new page for <timeline-range-name>
  • rewrite animation-range shorthand property.
  • make example detail how the property works and interacts with afm

@estelle estelle requested a review from a team as a code owner November 19, 2025 15:08
@estelle estelle requested review from chrisdavidmills and removed request for a team November 19, 2025 15:08
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Nov 19, 2025
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Nov 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

Preview URLs

Flaws (39)

URL: /en-US/docs/Web/CSS/Guides/Scroll-driven_animations
Title: CSS scroll-driven animations
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Web/CSS/scroll which is a redirect
    • Can't resolve /en-US/docs/Web/CSS/Guides/Logical_properties_and_values/Houdini

URL: /en-US/docs/Web/CSS/Reference/Properties/animation-range
Title: animation-range
Flaw count: 30

  • broken_links:
    • /en-US/docs/Web/CSS/animation-range-start is a redirect
    • /en-US/docs/Web/CSS/animation-range-end is a redirect
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#brackets is a redirect
    • /en-US/docs/Web/CSS/animation-range-start is a redirect
    • /en-US/docs/Web/CSS/animation-range-end is a redirect
    • and 20 more flaws omitted
  • macros:
    • Macro produces link /en-US/docs/Web/CSS/CSS_cascade/Value_processing which is a redirect
    • Macro produces link /en-US/docs/Web/CSS/CSS_cascade/Inheritance which is a redirect
    • Macro produces link /en-US/docs/Web/CSS/CSS_cascade/Value_processing which is a redirect
    • Macro produces link /en-US/docs/Web/CSS/CSS_animated_properties which is a redirect
    • Can't resolve /en-US/docs/Web/CSS/Guides/Logical_properties_and_values/Houdini

URL: /en-US/docs/Web/CSS/Reference/Values/timeline-range-name
Title: <timeline-range-name>
Flaw count: 7

  • broken_links:
    • /en-US/docs/Web/CSS/CSS_scroll-driven_animations/Timelines is a redirect
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#single_bar is a redirect
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#single_bar is a redirect
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#single_bar is a redirect
    • /en-US/docs/Web/CSS/CSS_values_and_units/Value_definition_syntax#single_bar is a redirect
    • and 1 more flaws omitted
  • macros:
    • Can't resolve /en-US/docs/Web/CSS/Guides/Logical_properties_and_values/Houdini
External URLs (2)

URL: /en-US/docs/Web/CSS/Reference/Properties/animation-range
Title: animation-range


URL: /en-US/docs/Web/CSS/Reference/Values/timeline-range-name
Title: <timeline-range-name>

(comment last updated: 2025-11-27 12:20:06)

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@estelle some comments for you to consider.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added merge conflicts 🚧 [PR only] and removed merge conflicts 🚧 [PR only] labels Nov 23, 2025
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Nov 24, 2025
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@estelle A few more bits for you on this one.

### Values
## Description

The `animation-range` shorthand property sets the `animation-range-start` and `animation-range-end` values, defining where along the animation timeline the animation will start and end. By default, animation keyframe effects are only applied to the elements when the animation is applied to the element based on the `animation-timeline`, meaning the animation is only applied between the range start and range end. To apply the animation outside of this range, set the {{cssxref("animation-fill-mode")}} to `backwards`, `forwards`, or `both`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"By default, animation keyframe effects are only applied to the elements when the animation is applied to the element based on the animation-timeline..." - this is really confusing, and I'm not sure what you're trying to say.

Maybe something like "By default, animation styles are only applied to animated elements during the animation..."


The {{glossary("Scroll container", "scroll port")}} area known as the view progress visibility range is the area inside which the subject element of a [named view progress timeline](/en-US/docs/Web/CSS/Guides/Scroll-driven_animations/Timelines#view_progress_timelines) animation is deemed to be visible. By default, this is the full range of the scrollport, but it can be adjusted using the {{cssxref("view-timeline-inset")}} property.

If two values are specified as components of the `<animation-range>` property, they will be interpreted in the order `<animation-range-start>` then `<animation-range-end>`. The value of each component is either the keyword `normal` or a {{cssxref("length-percentage")}} or a [`<timeline-range-name>`](/en-US/docs/Web/CSS/Reference/Values/timeline-range-name), optionally defined with a `<length-percentage>`. These values are space-separated. Normal is equal to `0%` for start and `100%` for end. Setting `normal` with a `<length-percentage>` for either the start or end range is invalid.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The value of each component is either the keyword normal or a {{cssxref("length-percentage")}} or a <timeline-range-name>" - it can be a <length-percentage> and a <timeline-range-name>, no? Did you mean and/or?

Note how the `from`, or `0%`, keyframe property values are not applied to the animated element until the top block border edge is `10%` past the container's bottom edge; it is full size, fully opaque, and magenta. At that point, the animation is applied and it is styled with the values defined by the `0%` keyframe selector. When the `animation-range-end` is reached, 25% from the top of the scrollport, it jumps back to its original styling.

{{EmbedLiveSample("Creating a named view progress timeline with range", "100%", "480px")}}
The jumping to the default state occurs because we did not set the {{cssxref("animation-fill-mode")}} property on the element, which can be used to apply an animation's styles to an element before and after the animation's execution. We've omitted the property in this example to better enable visualizing the effects of `animation-range`.But, generally, you will want to set `animation-fill-mode: both` when creating [scroll-driven animations](/en-US/docs/Web/CSS/Guides/Scroll-driven_animations).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explanation doesn't make sense. You've mentioned that you'll probably want to set animation-fill-mode: both, which is good, but you say that we've omitted it from this example, which is incorrect — you've provided a checkbox to allow readers to compare the results with and without. But you no longer talk about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rearranged it to clarify

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@estelle OK, this is looking much better now, nice work. I have left a few more minor grammar suggestions, but I'm approving, so you can consider these and then get it in.

estelle and others added 2 commits November 27, 2025 13:17
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
@estelle estelle merged commit ea22b9b into main Nov 27, 2025
13 checks passed
@estelle estelle deleted the scroll-animations branch November 27, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants