Community Forum

Over the years we have built up a community of email marketers, coders and designers that live and breathe email.

Use the Email on Acid Forum like your virtual water cooler: Stop by to discuss email code, quirky clients and fixes and post your issues (with an example of the code) for our community to offer its assistance.

Comcast Xfinity Webmail and !important


Total Posts:  21
Posted: 12 January 2018 01:28 PM

Comcast webmail is stripping the !important declaration from the css.  It does not matter if there is a space before it or I remove the that space so I have for example “mobile: {display:none!important;}”.  End result is Comcast output is “mobile {}” missing the whole display property and if I have “display: none !important;” it outputs “display: none;” without the !important. 

This is causing an issue with media queries for layouts when I have styling inlined where I can’t override the inlined styling with the media query. 

This appears to be recent because I don’t remember having issues with Comcast in the past when I use the code for mobile first approach and use media queries / the [owa] trick and conditional comments in outlook to display the desktop layout.  End result now is, mobile layout is being shown on Comcast.

Anyone have more information on this?



Total Posts:  1
Posted: 08 February 2018 12:34 PM
[ # 1 ]

From my tests via Email on Acid (not directly observing the markup), it appears that Comcast has started:
* Stripping rules with “!important” not preceded by a space (e.g. “display: none!important”)
* Stripping “!important from other rules, causing them to NOT override inline styles (e.g. “display: none !important” becomes “display: none”)
* Stripping rules like “height: auto” or “max-height: none” (regardless of “!important”), even if they are inline.  So if you have “height: auto” inline and “height: 0 !important” in a <style>, the “height: 0” becomes un-important but still takes effect because the “height: auto” is stripped from the inline styles.

To work around this, I’ve had to strip “height: auto” and “max-height: none” usages (which I was originally using for in-depth hiding for other email clients), and rely instead solely on “display: block/none” plus conditional comments, and just accept the fact that Comcast users see the simplified version of the emails.