mso-hide: all is still displaying the HTML element with a blank whitespace in height

Copper Contributor

I have a SalesForce email template code.

 

<table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="{!IF(Case.VAR__c==$Label.VAR_b,'mso-hide: all; display: none;',IF((Case.XXX__c==$Label.YYY)||(Case.VAR__c==$Label.PFP_g), 'min-width: 100%;', 'mso-hide:all; display: none;'))}">

 

So the table is hidden in the email in a browser if a condition is met.

But in Outlook 365 app on Windows 10 there is a 20px height gap of blank whitespace for this table when the condition is met. I read that MSO doesn't support display and I tried mso-hide: all but the gap still exists. I have a bunch of empty tables which results in a long gap between content.

 

mso-hide.png

(This gap isn't there in the browser.)

 

There is no issue when opening the mail in the browser - any browser. This is Outlook specific. Is there any workaround for this issue ?

0 Replies