fix(react-email): responsive padding not applying to inner td for Container and Section - #3733
Conversation
…tainer to the inner td
🦋 Changeset detectedLatest commit: fc387e4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
|
Running ultrareview automatically — This changes the core Tailwind element-cloning pipeline and public markAsElement API, affecting responsive CSS placement and residual classes across custom components, while Section and Container markup semantics are also refactored and only lightly tested.. I'll post findings when complete. |
There was a problem hiding this comment.
Ultrareview completed in 11m 17s
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
klotty
left a comment
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Fixes responsive padding on Section/Container by adding an optional resolveTailwind hook that routes padding-only classes to the inner td; backwards-compatible and covered by a new test.
Re-trigger cubic
Fixes #3693. Section and Container put padding on the inner td, but Tailwind left every non-inlinable class on the table, so a
max-sm:px-5media rule stacked on top of thepx-9base padding instead of overriding it. Instead of teaching Tailwind about Section,markAsElementnow accepts aresolveTailwindoption: Tailwind hands the marked component its inlined style, the residual classes, and the CSS properties each class sets, and the component decides which props they become. Section and Container use it to move padding-only classes onto the td, and the option is exported so user components can do the same. Components that don't pass it keep the previous behavior.Claude ran the repro from the issue against the branch. Relevant tags from the output:
The second pair is
<Container className="max-sm:p-2 p-4 max-sm:hidden">, showing a non-padding class staying on the table.Summary by cubic
Fixes responsive padding classes like
max-sm:px-5on<Section>and<Container>so they override the base padding instead of stacking on top of it.Migration
markAsElementnow accepts an optionalresolveTailwindoption; components that don't pass it keep the previous behavior.ElementOptions,ResolvedTailwind) are exported from the package entry point.Written for commit fc387e4. Summary will update on new commits.