Skip to content

Correct README examples to match current output - #213

Open
quantizor wants to merge 2 commits into
masterfrom
cursor/readme-example-outputs-29c0
Open

quantizor wants to merge 2 commits into
masterfrom
cursor/readme-example-outputs-29c0

Conversation

@quantizor

@quantizor quantizor commented Oct 29, 2026 •

Copy link
Copy Markdown

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. font now lists fontStyle, fontWeight, fontVariant, fontSize, fontFamily, lineHeight. flex-flow now 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.

Open in Web Open in Cursor 

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.
@changeset-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d6e3b78

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

The shorthand table still listed lineHeight before fontFamily, and
flexDirection before flexWrap. Both functions return the other order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant