Repository navigation
Fix transition with short time or easing before property - #1579
Open
Asimmirzac wants to merge 1 commit into
Open
Asimmirzac wants to merge 1 commit into
Asimmirzac wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Do you have a real use case for that? |
Author
|
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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