I was running some tests for another article when I encountered something in Yahoo Mail Beta which caused me some agony. When I uncovered the source of the problem, however, it became clear I could avoid it altogether. Allow me to share…

Yahoo Mail Beta omits all CSS declarations residing after a comment within a selector. Example:


body {
 color: #000;
 background: #fff;
 /* my comment here */
 margin: 0px;
}

Yahoo Mail Beta will render the color and background properties for this body selector while the margin property will be eradicated. I can only assume this process increases the security of this webmail client. (Ryan—if you’re reading and this is not the case, maybe you could bring it to the attention of to your boys in the back room?)

You can see how minor this is and how it can be avoided by simply not placing comments inside of a CSS declaration. But, again, I lost some time wondering why the properties I had in a style were not being rendered by Yahoo Mail Beta. I even cried a little. And no one should be made to cry. So enjoy this hot tip of the week.

  • http://unclehulka.com/ryan/blog/ Ryan Kennedy

    That’s…odd. 😉 I’ll talk to the powers that be and see if something can be done.

    Ryan Kennedy
    Yahoo! Mail

  • http://unclehulka.com/ryan/blog/ Ryan Kennedy

    Just spoke with someone about this and it’s a bug on our end. The comment trips us up just enough that the “margin: 0px;” gets dropped. I’ve filed a bug.

    Ryan Kennedy
    Yahoo! Mail

  • http://unclehulka.com/ryan/blog/ Ryan Kennedy

    Definitely a bug on our end. I spoke with the guy who wrote the scrubbing code and he immediately knew what was going on. You guys are actually pretty easy to please, all we have to do is not totally mangle the messages you send to our users. 😉 Seems a totally reasonable thing to expect.

    I’ll keep you updated here in the comments if I hear any progress on getting that bug fixed.

    Ryan Kennedy
    Yahoo! Mail

  • http://e-mds.com James Speer

    I am big fan of the Yahoo Mail beta, great product. I had not noticed this issue with it due to my mail development workflow. to keep the balance between content and code down to reduce potential spam blocking, I develop one version that contains comments, then my final I send out I strip all comments and format each style in a line
    example:
    color: #000;
    background: #fff;
    /* my comment here */
    margin: 0px;

    becomes:
    color: #000; background: #fff; margin: 0;

  • laborintensive

    Has anyone yet lost there mind and decided to move into a different field? Or are we all so in love with email marketing that regardless of how much of a pain in the ass it has become, we’ll do it. Seriously CM – I watch the amount of time and effort you spend on this just to keep up and its just amazing. Any thoughts?

  • http://www.pitt.edu Jason Head

    Ryan Kennedy – thanks for stepping in to the discussion…

    Speaking of Yahoo mail… and *not* the Beta..

    Have you guys (Yahoo) changed something in the way it renders HTML emails in the last few days?

    I’ve noticed yesterday that when testing a newly designed email, that Yahoo mail will not show *any* of my message once I say “Download Images” *or* if I set it to always download the images. Again, I noticed this in the last two days. Also, out of curiosity, I choose “Edit/Resend Campaign” for three previous emails sent through Campaign Monitor (Previously all tested in Yahoo Mail, and three different designs) and they too are not showing up in Yahoo mail. Again, these were designs that were all previously sent as well as testing in numerous e-mail clients including Yahoo mail.

    Has anyone else noticed this problem at all in the last few days? I know it sounds odd, but I send a good amount of Campaigns for work, and something like this is very different.

Want to improve your email marketing? Subscribe to get tips on improving your email marketing delivered to your inbox.
X

Join 120,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free