← CSS Support IndexDoes CSS
Does CSS :has() Work in HTML Email?
Represents an element if any of the selectors passed as parameters match at least one element.
Quick Answer
Does :has() work in HTML email?
The CSS :has() property is supported in Apple Mail, Samsung Email, ProtonMail, Fastmail. It is NOT supported in Gmail, Outlook (Windows), Outlook (Mac / Web), and others. Always include a safe fallback for unsupported clients.
Which Email Clients Support CSS :has()?
CSS support for :has() across email clients
| Email Client | Desktop | Mobile / Web | Notes |
|---|---|---|---|
| Gmail | ✗ No | ✗ No | — |
| Outlook (Windows) | ✗ No | ? | — |
| Outlook (Mac / Web) | ✗ No | ✗ No | — |
| Apple Mail | ✓ Yes | ✓ Yes | — |
| Yahoo! Mail | ✗ No | ✗ No | — |
| Samsung Email | ? | ✓ Yes | — |
| Thunderbird | ✗ No | ? | — |
| ProtonMail | ✓ Yes | ✓ Yes | — |
| Fastmail | ✓ Yes | ? | — |
Notes
- #1 Not supported. `:has(…)` is replaced by `:has`.
- #2 Not supported. But the pseudo-class seems interpreted and computed server side.
As of december 2021, `:has()` is only supported in [Safari Technology Preview 137](https://webkit.org/blog/12156/release-notes-for-safari-technology-preview-137/). As of march 2022, it is supported in Safari 15.4.
Frequently Asked Questions
Related CSS Properties
Test Your Email Now
Paste your HTML and see how it renders in clients that don't support :has().