Why do some clients strip CSS?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
Email clients strip CSS to protect their users from broken layouts and security risks. If your email breaks the inbox interface (overlays the navigation, hides the delete button, triggers popups), that's a nightmare for the email provider. So they aggressively filter CSS before rendering your email.
Which clients strip the most? Gmail strips embedded style blocks entirely (you have to inline everything). Outlook (desktop versions) blocks CSS like position: absolute, float, and anything that breaks Outlook's Word-based renderer. Yahoo Mail removes display: none because spammers use it to hide content from spam filters while showing it to readers. Apple Mail is the most permissive (it supports almost everything), but even Apple strips external stylesheets and JavaScript for security.
Why they do it: Security first. CSS can be weaponized. A malicious email could use position: fixed to overlay a fake login prompt on top of the inbox. It could use @import to load tracking pixels or malware from external servers. It could use background-image: url(tracker.png) to log when you open the email. Stripping CSS blocks most of these attacks.
Second reason: user experience. Email providers want their inbox interface to stay stable. If every email could rewrite the page layout, the inbox would be chaos. So they strip anything that affects positioning, visibility, or external resources.
What gets stripped most often:
position: absoluteandposition: fixed(breaks layout containment)display: none(hides content, used in spam)@importand external stylesheets (security risk)- JavaScript and
<script>tags (always stripped, no exceptions) - CSS animations and transitions (Gmail strips these entirely)
- Web fonts via
@font-face(Outlook and Gmail don't support them)
What this means for you: Use inline CSS for everything critical (colors, fonts, spacing). Put your style attributes directly on the HTML tags. Embedded <style> blocks work in some clients but not Gmail, so inline is safest. Test your emails in Email on Acid or Litmus to see what survives. And never rely on CSS for critical content (if you hide a CTA with display: none and show it with a media query, Gmail users won't see it).
If you're debugging why your email looks broken in one client but fine in another, CSS stripping is usually the reason. Check which styles got removed using our Source Analyzer (paste the raw HTML and see what clients actually render).
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.