[PR #160] [MERGED] feat(render): add <style> support & improve CSS compatibility #195

Closed
opened 2026-03-01 14:40:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/arikchakma/maily.to/pull/160
Author: @ChmaraX
Created: 3/18/2025
Status: Merged
Merged: 3/20/2025
Merged by: @arikchakma

Base: mainHead: feat/convert-styles-to-inline


📝 Commits (3)

## 📋 Pull Request Information **Original PR:** https://github.com/arikchakma/maily.to/pull/160 **Author:** [@ChmaraX](https://github.com/ChmaraX) **Created:** 3/18/2025 **Status:** ✅ Merged **Merged:** 3/20/2025 **Merged by:** [@arikchakma](https://github.com/arikchakma) **Base:** `main` ← **Head:** `feat/convert-styles-to-inline` --- ### 📝 Commits (3) - [`1135e79`](https://github.com/arikchakma/maily.to/commit/1135e79248ae95e58a215a04015e51f3abc6aa48) feat(render): add <style> support & improve CSS compatibiltiy - [`cd290a2`](https://github.com/arikchakma/maily.to/commit/cd290a2d9374211411e42558ffdadc2cc1772305) feat: scope the inline CSS to html block only - [`2e07ef8`](https://github.com/arikchakma/maily.to/commit/2e07ef89f39d1535d8b88e274476649c2410fb61) fix: add styles in preview ### 📊 Changes **4 files changed** (+237 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/editor/nodes/html/html-view.tsx` (+6 -1) 📝 `packages/render/package.json` (+1 -0) 📝 `packages/render/src/maily.tsx` (+8 -3) 📝 `pnpm-lock.yaml` (+222 -0) </details> ### 📄 Description Add support for: - Extracting and preserving <style> tags from HTML block - Transforming styles to in-line styles for email client compatibility - Maintaining CSS styling across email clients This enables using <style> tags in email templates while ensuring compatibility with various email clients and preserving consistent WYSIWYG rendering. ## Before Inconsistent - In block preview both are rendered with styles, in email preview one of them is rendered with styles, in actual email both none are rendered with styles. Editor: https://github.com/user-attachments/assets/6b356886-032c-4139-9d23-23878d5dd226 Email client: ![image](https://github.com/user-attachments/assets/03c8505e-a3b0-4ebe-8c3c-412b7547afeb) ## After Consistent - both are rendered with styles everywhere. Editor: https://github.com/user-attachments/assets/1a73d0a1-df1f-4617-9599-9a4a4b55617c Email client: ![image](https://github.com/user-attachments/assets/d1786a17-a74f-4384-a3d5-ba51505b280d) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 14:40:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#195
No description provided.