37signals/mail_view — pull request #34 by toolmantim (2013-02-08 04:06:34+00:00)
Title: Use an iframe to embed HTML emails

This changeset allows for more accurate previewing of HTML emails which style the body element. Instead of inserting the HTML email directly into the page we embed it via an iframe.

It has the same goal as #21 but is a smaller patchset, and is against the current master.

Before:

![html-embed-email](https://f.cloud.github.com/assets/153/138423/6eff4fa2-71a4-11e2-89d0-1e46823c182f.png)

The browser has merged the styles in the embedded HTML email into the top level doc, creating a weird mish-mash.

After:

![html-iframe-email](https://f.cloud.github.com/assets/153/138420/fbc5432a-71a3-11e2-8904-cdbae310bd4a.png)

Everything's self-contained, just like in an email client, and stretches & scrolls to the full height thanks to flexbox. The styles have also been simplified and slightly improved to more closely match Mail.app.