Repository navigation
Fix flex-flow wrap-reverse in the 2009 box-orient and box-direction fallback - #1578
Merged
Merged
Conversation
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.
Fixes #1577.
Fixes the filter in
lib/hacks/flex-flow.jsthat is meant to dropwrap,nowrapandwrap-reversebefore the 2009box-orientandbox-directionfallback is built. The last operand was the bare string'wrap-reverse', which is always truthy, sowrap-reversewas kept and read as a vertical, reversed direction.Before, for
safari 6:After: the first gets no 2009 declarations (like
flex-flow: wrap), the second getsverticalandnormal.Behavior change: only output for
flex-flowvalues that containwrap-reverse, and only for browsers that use the 2009 spec. Other values give the same output as before.Tests: added
.jand.ktotest/cases/flexbox.cssand.out.css. With the oldlib/hacks/flex-flow.jsthe suite shows 287 of 289 passing (the flexbox case fails in 2 tests). With the fix, all 289 pass.oxlintandoxfmt --checkare clean on the changed files. I also compared main and the fix on 399 combinations of 1 to 3 direction and wrap keywords, each with single space, double space and tab separators (1197 runs), against a small oracle: main was wrong on 192, the fix on 0, and no input that was right on main changed output.I did not edit CHANGELOG.md.
Validated with Claude Opus 5.5.