Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

text-start/text-end silently dropped — parseTextAlign rejects logical values

オープン
#454 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@Abdalkaderdev がすでに取り組んでいます。

2026年10月8日 から。

  • #471 @Abdalkaderdev による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
react-native, tailwindcss, typescript

調査の方向性

The mapping lives in parseTextAlign in react-native-css/compiler/declarations.ts; start there and add the start to left and end to right cases. Pull request #471 is already open against this issue, so check its diff and review thread before writing anything. Done means text-start and text-end emit textAlign values RN accepts, and the reproduction branch shows the alignment in RTL.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

The text-start and text-end utility classes from Tailwind CSS v4 are silently dropped. No alignment is applied — the builder emits a warning but no error.

Root cause

parseTextAlign in react-native-css/compiler/declarations.ts only allows ["auto", "left", "right", "center", "justify"]. Tailwind v4 generates text-align: start/end for text-start/text-end, which are rejected.

React Native does not accept "start"/"end" as textAlign values. However, per Expo's localization guide, RN's "left" already behaves as logical start on <Text> (flips to right in RTL), and "right" as logical end.

Proposed fix

Map at compile time in parseTextAlign:

if (value === "start") return "left";
if (value === "end") return "right";

No runtime changes needed — RN handles the RTL flipping natively on <Text>. (Note: <TextInput> treats left/right as physical values — see facebook/react-native#45255.)

Reproduction

Steps:

  1. npm install && npx expo run:ios
  2. Press "Force RTL" button
  3. Fully restart the app
  4. The text-start class should align the text right in RTL, but no alignment is applied

Expected behavior

text-start should apply textAlign: "left" (which RN treats as logical start, flipping to right in RTL on <Text>).

Workaround

Use patch-package with the patch from the fix branch.

Environment

  • react-native-css: 3.0.7
  • nativewind: 5.0.0-preview.4
  • react-native: 0.86.0
  • expo: 57
主要言語
TypeScript
スター
166
フォーク
45
平均マージ
13日 14時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nativewind/react-native-css のほかの issue

nativewind/react-native-css の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。