Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#454 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@Abdalkaderdev ya está trabajando en esto.

Desde el 8/10/2026.

  • #471 de @Abdalkaderdev — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
react-native, tailwindcss, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
166
Forks
45
Merge medio
13 d 14 h
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nativewind/react-native-css

Todos los issues de nativewind/react-native-css

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.