Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#454 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

@Abdalkaderdev arbeitet bereits daran.

Seit 08.10.2026.

  • #471 von @Abdalkaderdev — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
react-native, tailwindcss, typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
TypeScript
Sterne
166
Forks
45
Ø Merge
13 T. 14 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nativewind/react-native-css

Alle Issues in nativewind/react-native-css

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.