alexdunae/premailer — Issue #105: All CSS styles in one div wrapper
Author: ArtedeMagia
Created: 2012-02-01 05:46:32+00:00
State: open

This is an Enhancement suggestion.

Would it be possible to let one div in the document do have all the wrapping styles?

What I mean is, the div that holds the email content inherits the CSS styles from the surrounding elements (ancestor divs and body), but it would be nice if all the "computed" style values could be written in the content wrapper div.

This way, you could create an email through a CMS and it would use all the theme styles, easily discarding the header, menu, etc.

At the moment, all the global styles have to be copied from the surrounding elements to the content wrapper div, discarding manually all the styles already declared in the content wrapper div.

Also, if I'm not wrong, it's better to have all the email global styles in a div rather than the body, because some email clients (Gmail) do exclude de body element and show only it's contents.

I don't know how hard would it be to implement that... it's just an idea.