Make plvt_inject_animation_duration() reusable for all transition types, including default fade#2078
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #2078 +/- ##
==========================================
- Coverage 67.16% 67.14% -0.03%
==========================================
Files 93 93
Lines 7745 7740 -5
==========================================
- Hits 5202 5197 -5
Misses 2543 2543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
felixarntz
left a comment
There was a problem hiding this comment.
@mukeshpanchal27 Neat, I love this - great catch!
Summary
Follow-up to #2040
In #2051, we introduced the
plvt_inject_animation_duration()function to support custom animation durations for non-fade transitions. For the default fade transition, however, we had to applyanimation-durationdirectly since it doesn’t support the CSS variable--plvt-view-transition-animation-duration.This PR refactors and improves the implementation by making
plvt_inject_animation_duration()reusable across all transition types including the default fade effect. It ensures consistent handling of animation durations, whether via CSS variables or direct CSS properties, depending on what the browser supports for a given transition type.