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

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

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

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

2026年11月1日 から。

  • #3846 @SwissArmyBud による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
tailwindcss, typescript
領域
cli, documentation

調査の方向性

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.

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

説明

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

主要言語
TypeScript
スター
19.9k
フォーク
1.1k
平均マージ
2日 15時間
マージ済み PR(30日)
61

環境構築

はじめの一歩

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

resend/react-email のほかの issue

resend/react-email の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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