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

%3CLINGO-SUB%20id%3D%22lingo-sub-2452039%22%20slang%3D%22en-US%22%3Emso-hide%3A%20all%20is%20still%20displaying%20the%20HTML%20element%20with%20a%20blank%20whitespace%20in%20height%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2452039%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20SalesForce%20email%20template%20code.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%3C%2FCODE%3E%3CTABLE%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20width%3D%22100%25%22%20role%3D%22presentation%22%20style%3D%22%7B!IF(Case.VAR__c%3D%3D%24Label.VAR_b%2C'mso-hide%3A%20all%3B%20display%3A%20none%3B'%2CIF((Case.XXX__c%3D%3D%24Label.YYY)%7C%7C(Case.VAR__c%3D%3D%24Label.PFP_g)%2C%20'min-width%3A%20100%25%3B'%2C%20'mso-hide%3Aall%3B%20display%3A%20none%3B'))%7D%22%3E%3CP%3ESo%20the%20table%20is%20hidden%20in%20the%20email%20in%20a%20browser%20if%20a%20condition%20is%20met.%3C%2FP%3E%3CP%3EBut%20in%20Outlook%20365%20app%20on%20Windows%2010%20there%20is%20a%2020px%20height%20gap%20of%20blank%20whitespace%20for%20this%20table%20when%20the%20condition%20is%20met.%20I%20read%20that%20MSO%20doesn't%20support%20%3CSTRONG%3Edisplay%3C%2FSTRONG%3E%20and%20I%20tried%20%3CSTRONG%3Emso-hide%3A%20all%3C%2FSTRONG%3E%20but%20the%20gap%20still%20exists.%20I%20have%20a%20bunch%20of%20empty%20tables%20which%20results%20in%20a%20long%20gap%20between%20content.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20no%20issue%20when%20opening%20the%20mail%20in%20the%20browser%20-%20any%20browser.%20This%20is%20Outlook%20specific.%20Is%20there%20any%20workaround%20for%20this%20issue%20%3F%3C%2FP%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2452039%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOutlook%20for%20Windows%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FTABLE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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