text-start/text-end silently dropped — parseTextAlign rejects logical values
Los mantenedores suelen responder en 3 días
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
- Área
- frontend, internationalization
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
- Bug branch: https://github.com/Noitidart/nativewind-v5-rtl-bugs/tree/issue-3-text-start-end
- Fix branch (patch-package): https://github.com/Noitidart/nativewind-v5-rtl-bugs/tree/issue-3-text-start-end-fix
Steps:
npm install && npx expo run:ios- Press "Force RTL" button
- Fully restart the app
- The
text-startclass 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
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nativewind/react-native-css
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#545 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#544 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#543 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nativewind/react-native-css#540 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nativewind/react-native-css#538 ·
Los mantenedores suelen responder en 3 días
Todos los issues de nativewind/react-native-css
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
CopilotKit/openmuse#215 ·
Los mantenedores suelen responder en 3 días
-
b:minor bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
software-mansion/argent#1698 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · 1 comentario ·
Los mantenedores suelen responder en 1 día