Skip to content

Conversation

@mrobinson
Copy link
Member

From https://www.w3.org/TR/css-transitions-1/#transitions:

If a property is specified multiple times in the value of
transition-property (either on its own, via a shorthand that contains
it, or via the all value), then the transition that starts uses the
duration, delay, and timing function at the index corresponding to the
last item in the value of transition-property that calls for animating
that property.

Iterating in reverse order means that transitions that appear last will
have preference over those that appear first in the list.

Signed-off-by: Euclid Ye yezhizhenjiakang@gmail.com

…to ones defined later

From https://www.w3.org/TR/css-transitions-1/#transitions:

> If a property is specified multiple times in the value of
> transition-property (either on its own, via a shorthand that contains
> it, or via the all value), then the transition that starts uses the
> duration, delay, and timing function at the index corresponding to the
> last item in the value of transition-property that calls for animating
> that property.

Iterating in reverse order means that transitions that appear last will
have preference over those that appear first in the list.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
@mrobinson mrobinson added this pull request to the merge queue Jul 3, 2025
Merged via the queue into main with commit ece4971 Jul 3, 2025
3 checks passed
@mrobinson mrobinson deleted the reverse-transition-properties branch July 3, 2025 10:02
github-merge-queue bot pushed a commit to servo/servo that referenced this pull request Jul 3, 2025
#37176)

This change bumps stylo to servo/stylo#214, to fix an issue where
transition
properties defined earlier on the list of transitions were taking
preference over
those defined later.

Testing: This fixes a couple WPT tests.
Fixes: #37164

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants