Email-builder / grunt-email-builder

Build Emails from HTML / CSS code in grunt
Other
94 stars 14 forks source link

Conditional outlook statement... build bug #25

Closed leetomblin closed 10 years ago

leetomblin commented 10 years ago

Me again (sorry) - another outlook conditional tag issue.

<!--[if !mso]><!--><div class="is-mobile">mobile content here</div><!--<![endif]-->

Is compiled to:

<!--[if !mso]><!--><div class="is-mobile" style="display: none; max-height: 0px; overflow: hidden;">mobile content here</div>--&gt;<!--<![endif]-->

Notice the HTML greater than.

jeremypeter commented 10 years ago

Looks like your conditional comment is wrong. Try: <!--[if !mso]> <div class="is-mobile">mobile content here</div> <![endif]-->

leetomblin commented 10 years ago

There's an article about this conditional tag here:

http://freshinbox.com/blog/bulletproof-solution-to-hiding-mobile-content-when-opened-in-non-mobile-email-clients/

I actually tried the one you posted before, but doesn't seem to work in a few older outlook versions.

jeremypeter commented 10 years ago

Oh ok I'll see what I can do. Here's another way of hiding elements without using conditional comments and a technique I use. https://www.campaignmonitor.com/forums/post/30296/#p30296

jeremypeter commented 10 years ago

Fixed https://github.com/yargalot/Email-Builder/commit/96d81e4611b485d3a881186959c1465559f15119#diff-db0edc6462d0667ef460319dc707be55R46 @yargalot You may need to publish to npm manually

yargalot commented 10 years ago

Yeh sure, Ill have a look at the publishing stuff now

yargalot commented 10 years ago

Published