bug(tailwind): `pixelBasedPreset` only converts spacing and font size; `rounded-*` and `max-w-*` still emit `rem`

Abierto
#3,845 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@SwissArmyBud ya está trabajando en esto.

Desde el 1/11/2026.

  • #3846 de @SwissArmyBud — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
tailwindcss, typescript

Línea de trabajo

The preset is defined where pixelBasedPreset overrides theme.extend.fontSize and theme.extend.spacing; read that override first, then compare it with Tailwind's default borderRadius and maxWidth scales. Done means rounded-* and max-w-* also emit pixel values, with the demo at packages/react-email/demo/ab.tsx showing no rem left in the output. Tests should cover the new scales.

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

Descripción

What versions are you using? (if relevant)

latest

Describe the Bug

The docs present pixelBasedPreset as the fix for Tailwind's rem units not being supported by many email clients. In [email protected] it only overrides theme.extend.fontSize and theme.extend.spacing, so other utilities that Tailwind expresses in rem still reach the inlined CSS unchanged. The docs do not say the preset is partial, so it is easy to assume everything returned is now in pixels.

What is affected (leave empty if unsure)

Tailwind Component

Link to the code that reproduces this issue

https://github.com/SwissArmyBud/react-email/tree/aporter/2611-rem-from-pixelbasedpreset-demo

To Reproduce

A runnable before/after demo lives on a separate branch so it stays out of this PR:
aporter/2611-rem-from-pixelbasedpreset-demo.
Its README walks through it: cd packages/react-email && npx tsx demo/ab.tsx renders the same email with and without the new scales and prints the rem values found in each, all to local HTML for review. The branch also holds captured evidence (evidence-02.txt to evidence-07.txt: the published-package baseline, per-class output, the scan of Tailwind's rem scales, and the mutation check for the tests) and pre-generated a/b output in the demo folder.

Expected Behavior

The docs present pixelBasedPreset as the fix for Tailwind's rem units not being supported by many email clients, so it is easy to assume everything returned is now in pixels.

What's your node version? (if relevant)

24/LTS

Lenguaje dominante
TypeScript
Estrellas
19.9k
Forks
1.1k
Merge medio
2 d 15 h
PR fusionados (30 d)
61

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 resend/react-email

Todos los issues de resend/react-email

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.