seanpowell / Email-Boilerplate

The email boilerplate for sending out nicely formatted messages.
htmlemailboilerplate.com
3.81k stars 676 forks source link

!important #14

Closed kayluhb closed 8 months ago

kayluhb commented 12 years ago

I have found that !important is getting ignored by outlook 2007 when applying color to h1-6 tags. The apparent workaround is to just declare the color twice, which should work fine with hotmail.

color:black; color:black !important;

I haven't seen this mentioned anywhere, but I haven't looked that hard either, so feel free to ignore this if I'm overlooking something.

kbav commented 11 years ago

+1. Just lending my voice on this.

"Outlook 2007 will totally ignore any inline style which uses the !important declaration"

http://www.campaignmonitor.com/blog/post/3143/outlook-2007-and-the-inline-important-declaration/

revelt commented 8 years ago

I code emails for living and I never use H tags. What are the benefits of H tags anyway? SEO — none in email. Accessibility — maybe, but hidden text and ALT tags is the way to improve it. Semantics — it's not of a concern either when whole HTML is full of table layout.

bago commented 8 years ago

@revelt how does H tags relate to this topic? Also, before we talk about benefits of H tags, what are the problems with H tags?

revelt commented 8 years ago

@bago H tags are this topic, please re-read the first message from kayluhb:

...when applying color to h1-6 tags

The problems are email software will try to change font-size, line-height or both, and differently across different software. This means, you have a liability — you never know how the next webmail update will distort your heading. On other hand, using simple text is always reliable, just use font-size, line-height (with mso- fix) and padding on TD to space it.

bago commented 8 years ago

In italy we have a webmail that strips any STYLE, either inline or not. So in this case if you use h tags the recipient see big titles, otherwise everthing will be styled the same. And some webmail add styling for "*" so you have to override the styles for most tags anyway if you want to keep consistency.

I suggest using an inliner that doesn't inline "!important" while inlining the styles in the correct order depending on the presence of the "!important" (e.g: Litmus Inliner or Automattic Juice after my recent patches).

revelt commented 8 years ago

webmail that strips any STYLE, either inline or not

that's hardcore!

@bago Good job on juice!