ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 238 forks source link

emails lose responsive styling #98

Closed mainej closed 10 years ago

mainej commented 10 years ago

Responsive styles (implemented with @media queries) need to be located in a very specific part of the document. letter_opener interferes with this by wrapping the html document output from the template in another html document.

I believe the fix is to wrap the html output in an iframe (like mail_view does). You may have to use srcdoc instead of src.

nashby commented 10 years ago

@mainej thanks, it's fixed by your pull request.