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: absolute and position: fixed (breaks layout containment)
  • display: none (hides content, used in spam)
  • @import and 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.

Ask an AI · tailored to your setup

Get AI help with your CSS rendering →

I read this on the Email Almanac about "Why do some clients strip CSS": "Email clients strip CSS to protect their users from broken layouts and security risks. Gmail strips embedded style blocks entirely. Outlook blocks positioning CSS. Yahoo removes display:none because spammers use it to hide content." Help me understand how this affects MY email design: 1. Which CSS properties are safe to use across all major clients? 2. How do I test which styles are getting stripped in my emails? 3. Should I inline all my CSS or use embedded style blocks? 4. What's the fastest way to fix broken layouts caused by CSS stripping? --- My details (fill in what applies): - Email platform/ESP: e.g. Mailchimp, Klaviyo, custom HTML - Which clients are you seeing layout issues in? Gmail, Outlook, Yahoo, Apple Mail - Are you using a template or coding from scratch? - What's breaking? buttons, images, spacing, colors, fonts - Current challenge: describe what looks wrong

Edit the yellow boxes, then send to the AI of your choice.