Skip to content

Conversation

@jaredpalmer
Copy link
Owner

Summary

  • Removed inline styles from email templates and replaced them with CSS classes
  • Improved code maintainability by separating styling concerns from HTML markup
  • Verified that juice properly inlines all CSS styles for email client compatibility

Changes Made

new-template.ts

  • Replaced inline styles on story elements with CSS classes (story-container, story-cell, story-title, story-title-link, story-description, story-meta, story-readmore)
  • Replaced inline styles on markdown/HTML containers with CSS classes
  • Replaced inline styles on wrapper elements with CSS classes (wrapper, wrapper-cell, header-cell, content-cell)

old-template.ts

  • Added story-wrapper div with CSS class for better structure
  • Added html-content wrapper for HTML elements
  • Moved element spacing to CSS classes

Test Plan

  • Verified development server runs without errors
  • Tested email generation with new template via /api/premail endpoint
  • Tested email generation with old template via /api/premail endpoint
  • Confirmed juice properly inlines CSS styles in generated HTML
  • Verified HTML output maintains proper email client compatibility

🤖 Generated with Claude Code

- Replaced inline styles with CSS classes in new-template.ts
- Replaced inline styles with CSS classes in old-template.ts
- Added structured CSS classes for story elements, containers, and wrappers
- Verified juice properly inlines all CSS styles for email compatibility
- Improved code maintainability by separating styling from markup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jaredpalmer jaredpalmer temporarily deployed to spmail-cleanup-email-te-m4mkns August 22, 2025 19:42 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants