Skip to main content

Our email CSS engine is open source. Give it a star on GitHub 

Emailens

Outlook 365 email CSS: what breaks, and what to write instead

169 of 300 features work in Outlook 365 · 34 partial · 97 not supported. It differs from Outlook (New) on 1 feature: text-shadow.

Works 169 · Partial 34 · Not supported 97 · Untested 0 · of 300

Outlook Web · webmail · prefers-color-scheme: works

The checker needs a computer screen.

See what breaks ↓

Outlook 365 opens with a free account.

A free account opens all 21 clients and keeps your checks for 7 days. Create a free account →

@emailens/engine 0.18.22 · data last changed 10 Nov 2026

Where Outlook 365 is the outlier

1 feature work in at least 14 of the other 20 clients and is not supported here.

So an email that looks right in most clients can reach your reader in Outlook 365 without them.

Outlook 365 on real installs

The Emailens probe for each feature, captured on Outlook 365's own installs, next to the Emailens live preview of Outlook 365.

animation in a real Outlook.com

Outlook 365

caniemail: animation is not supported in Outlook 365.

This Outlook.com install drops the <style> in the head, so only inline styles apply.

linear-gradient in a real Outlook.com

Outlook 365

caniemail: linear-gradient is not supported in Outlook 365.

This Outlook.com install drops the <style> in the head, so only inline styles apply.

overflow in a real Outlook.com

Outlook 365

caniemail: overflow is partly supported in Outlook 365.

This Outlook.com install drops the <style> in the head, so only inline styles apply.

Partial. overflow-block & overflow-inline not supported.

What to write instead

7 features Outlook 365 does not fully support have a written fix. See them in the table ↓

transform

The fix for Outlook 365

Pre-render transformed states as images or use table layout

The engine still flags this in the fix: An image points to an address no inbox can load (rotated-content.png), so Outlook 365 shows a broken image instead.

after
<!-- Pre-render rotated content as an image -->
<img src="rotated-content.png" width="200" height="200"
  alt="Rotated content"
  style="display: block; border: 0;" />
Show the original
before
<div style="transform: rotate(45deg);">
  Rotated content
</div>

The checker needs a computer screen.

<svg>

The fix for Outlook 365

Convert inline SVG to an image for email compatibility

after
<img src="https://example.com/icon.png"
  width="24" height="24" alt="Icon"
  style="display: block; border: 0;" />
Show the original
before
<svg width="24" height="24" viewBox="0 0 24 24">
  <path d="M12 2L2 7l10 5 10-5-10-5z" fill="#6d28d9"/>
</svg>

The checker needs a computer screen.

animation

The fix for Outlook 365

Replace CSS animation with an animated GIF

after
<!-- Use an animated GIF for the effect -->
<img src="https://example.com/badge-animated.gif"
  width="60" height="24" alt="New!"
  style="display: inline-block; border: 0;" />
Show the original
before
<style>
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
  .badge { animation: pulse 2s infinite; }
</style>
<span class="badge">New!</span>

The checker needs a computer screen.

Paste your email and see what Outlook 365 does to it.

The checker needs a computer screen.

Dark mode in Outlook 365

Live preview: Outlook.com applies partial color inversion in dark mode.

How to target Outlook 365

Selectors that single out Outlook 365, from the community list the engine ships (howtotarget.email). Copy one and replace .your-class-name.

css
[class~="x_your-class-name"] {
  /* Replace this comment with your styles */
}

Outlook.com prefixes class names with x_ but doesn't do this on attribute selectors.

css
[data-ogsc] .your-class-name {
  /* Replace this comment with your styles */
}

When changing a color style in dark mode, Outlook will add data-ogsc to the element.

css
@media (display-mode: standalone) {
  [class~=""x_your-class-name""] {
    /* Replace this comment with your styles */
  }
}

Outlook PWA supports the same targeting as Outlook.com and Outlook apps.

@media is partly supported in Outlook 365. Check this selector on your email before relying on it.

css
.your-class-name.x_chained-class-name {
  /* Styles for outlook webmail only */
}
.your-class-name.chained-class-name {
  /* Styles for everyone else */
}
No longer works (1)
css
@media (min-resolution: 1dpi) {
  body[data-outlook-cycle] .your-class-name {
    display: block!important;
  }
}

Build one for several clients →

Before you send to Outlook 365

  • Test in both light and dark mode. Corrections written against data-ogsc selectors only take effect in the dark branch.
  • Make sure any form in the email degrades to a link, since values are never submitted.
  • Keep a strong system font stack: no @font-face font will load here.

Every feature in Outlook 365

Show

HTML Elements · 16 of 48 not supported or partial here

HTML Attributes · 9 of 22 not supported or partial here

HTML & Email Structure · 3 of 8 not supported or partial here

CSS At-Rules · 5 of 10 not supported or partial here

Pseudo-Elements · 6 of 6 not supported or partial here

  • ::after Partial. Partial Works in 6 of 21
  • ::before Partial. Partial Works in 6 of 21
  • ::first-letter Partial. Partial Works in 10 of 21
  • ::first-line Partial. Partial Works in 10 of 21
  • ::marker Not supported Works in 10 of 21
  • ::placeholder The pseudo-element is supported but <input> elements are not. Partial Works in 9 of 21

Pseudo-Classes & Selectors · 25 of 34 not supported or partial here

CSS Functions · 7 of 8 not supported or partial here

CSS Properties · 60 of 164 not supported or partial here

How Outlook 365 renders email

Outlook on the web (Outlook.com and Microsoft 365 in the browser) renders email in the browser rather than with Microsoft Word, so it supports far more than Outlook Classic: <style> blocks, flexbox, grid, border-radius, background images and dark-mode media queries all work. Its gaps are web fonts, forms that submit, and nested media queries.

@font-face
Not supported. A web font never loads here, so the fallback in your font stack is what readers see.
Forms
Inputs and selects render, but the form does not submit its values. Interactive email that depends on a submit will not work.
Nested media queries
Removed. Keep media queries flat; one nested inside another is dropped.
  • Conditional comments (<!--[if mso]>) are read only by Outlook Classic's Word engine. Outlook on the web ignores them, which is what lets one template carry Word-specific fixes without affecting this client.
  • position is only partly supported and transform not at all, so overlays and rotated elements need a static design underneath.
  • Because the new Outlook for Windows is built on Outlook on the web, a check here is also the best available guide to how the new Windows app will render.

Get new email CSS fixes by email.

caniemail (MIT) via @emailens/engine 0.18.22 · data last changed 10 Nov 2026