origin-* classes: would you take a PR for transformOrigin now, or after 5.0?

未關閉
#509 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 12 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
56/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
react-native, tailwindcss, typescript
領域
frontend, mobile

研究方向

Read the compatibility notes for the NativeWind v5 RC and inspect how origin-* classes are currently handled in react-native-css. The issue gives a reproduction using origin-top-left rotate-45 and the expected transformOrigin behavior on iOS and Android. Confirm whether a PR is wanted for the 5.0 release before starting; done means the class maps to the expected style and the behavior is covered on both platforms.

由索引模型根據 Issue 內容生成。

描述

Before submitting a new issue
  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.
  • I checked that React Native supports the styles I am using.
  • If using animations/transitions, I checked that React Native Reanimated supports the styles I am using.
Bug summary

More a question than a bug. We use react-native-css through the NativeWind v5 RC in our Expo app.

origin-top-left rotate-45 rotates around the center on iOS and Android, because the origin part is dropped. React Native has supported transformOrigin since 0.73, and style={{ transformOrigin: "top left", transform: [{ rotate: "45deg" }] }} rotates around the corner as expected. Checked on React Native 0.86.3, iOS 26.5 simulator and Android 17 emulator.

I saw it's listed as not supported in the RC compatibility notes, and that the v4 PR nativewind/nativewind#1126 was closed. Would you take a PR that maps the origin-* classes to transformOrigin now, or would you rather wait until after 5.0? Either is fine with me, the style prop works in the meantime.

Tailwind CSS classes
<View className="origin-top-left rotate-45" />
// style on iOS and Android: { transform: [{ rotateZ: "45deg" }] }
// expected: the same, plus a transformOrigin for the top left corner
Environment info
  npmPackages:
    react: 19.2.3 => 19.2.3
    react-native: 0.86.3 => 0.86.3
    react-native-css: 3.1.0-rc.0 => 3.1.0-rc.0
    tailwindcss: 4.1.12 => 4.1.12
主要語言
TypeScript
星號
166
分支
45
平均合併
17 天 22 小時
30 天內合併 PR
3

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

nativewind/react-native-css 的其他 Issue

查看 nativewind/react-native-css 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。