Repository navigation
Fix transition with short time or easing before property - #1579
Asimmirzac wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Do you have a real use case for that? |
|
No, I have no report from a real project. I found it by comparing the output for different orders of the same value. Where it can matter today: If that is too little to justify the change, feel free to close this. Prepared with AI assistance (Claude Code). |
# Conflicts: # lib/transition.js
|
Please stop asking LLM to find what to fix in my repos. You are just stealing my free time without improving the project. |
In
transitionthe time and the easing can go before the property name.Transition#findProp()supports it only if the first word starts with a digit, so a shorter.3s(minifiers print it this way) or an easing keyword hides the property and Autoprefixer does not add prefixes.For
safari 17:Removing outdated prefixes had the same problem: for
chrome 100,.3s -webkit-transform, .3s transformkept-webkit-transform, but0.3s -webkit-transform, 0.3s transformdid not.Now
findProp()takes the first word which is not a time and not an easing keyword. If there is no such word, it returns the first token as before.Behavior change: only values where the property name is not the first word. I compared the old and new code on 728 orderings of property, time and easing for 3 browser lists (2184 runs). The output changed in 300 of them, never for a value with the name in the first place, and every ordering now gets the same prefixes as the name-first one.
Tests: added
.revert-shortand.revert-easingtotest/cases/transition.css. All 289 tests pass, 3 of them fail with the oldlib/transition.js.oxlintandoxfmt --checkare clean onlib/transition.js.Prepared with AI assistance (Claude Code).
🤖 Generated with Claude Code