Repository navigation
Conversation
The transform example listed functions in CSS source order. The parser prepends each function, so scale comes before translate. The border-radius note named borderTopLeft instead of borderTopLeftRadius. The font shorthand example now uses the key order the function returns.
|
The shorthand table still listed lineHeight before fontFamily, and flexDirection before flexWrap. Both functions return the other order.
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.
The README examples were run against a build of the current trunk. Only the README changed.
The transform example listed translate before scale. The parser prepends each function, so the result is scale, then translateY, then translateX. The example now shows that order. The old comment said this fixed a backwards transform order. That comment described an order the function does not return.
The border-radius opt-out note named the expanded property borderTopLeft. The expanded properties are the four corner radii, starting with borderTopLeftRadius.
The font and margin example had the right values, but the keys were not in the order the function returns. The example now matches that order.
The shorthand table had the same kind of mismatch in two cells.
fontnow lists fontStyle, fontWeight, fontVariant, fontSize, fontFamily, lineHeight.flex-flownow lists flexWrap, flexDirection. Every other table row was checked against transform() and already matched the returned keys.React Native's transform composition was checked before adding a reason for the reversal. resolveTransform walks the array from front to back and right-multiplies each operation. Running those formulas, an array of translateX(10) then scale(2) maps the point (1, 0) to (12, 0), which is scale first and then translate. The last array entry is applied first, the same rule CSS uses for the rightmost function. Because of that, this change does not say that React Native applies transforms in array order.
The other README examples matched the build: the font-size, line-height, and color object; the text-shadow offset and font-variant in the transform example; getPropertyName('border-width'); getStylesForProperty for a four-value border width; transformRawValue('opacity', '0.5'); and the border-radius blacklist result { borderRadius: 50 }.
Format, lint, and the unit tests passed on the earlier commit. Library behavior is unchanged.