Selector or pseudo-class · data last changed 10 Nov 2026
:attribute-selector in email clients
Works in 6 of 21. Not supported in Outlook Classic and Proton Mail. Partial in Gmail, Gmail Android, Gmail iOS and 9 more. Untested in Superhuman.
Your reader in Outlook Classic sees the email without :attribute-selector, even if it looks right where you tested it.
caniemail (MIT) via @emailens/engine 0.18.22
What to do instead in Outlook Classic
Use attribute selectors only when <style> blocks are preserved. For Outlook coverage, duplicate the styling inline on the matching elements. Treat attribute-based selectors as progressive enhancement, never as the only path to a critical style.
There is no drop-in fix for :attribute-selector in Outlook Classic. Design so the email still reads without it.
No signup · Five clients free, Outlook Classic included · All 21 with an account
The checker needs a computer screen.
A free account opens all 21 clients and keeps your checks for 7 days. Create a free account →
Every account includes one free real-device check in classic Outlook, Outlook for Mac and Apple Mail, after you verify your email and run one preview, while this month's free capacity lasts. How real-device checks work →
:attribute-selector is not among the 24 features we have screenshotted on real installs. The ones we have →
All 21 clients, problems first
| Client | Support |
|---|---|
| Outlook Classic | Not supported |
| Proton Mail | Not supported |
| Gmail | Partial See caveat 1 |
| Gmail Android | Partial See caveat 2 |
| Gmail iOS | Partial See caveat 2 |
| Outlook 365 | Partial See caveat 3 |
| Outlook (New) | Partial See caveat 3 |
| Outlook iOS | Partial See caveat 4 |
| Outlook Android | Partial See caveat 4 |
| Outlook for Mac | Partial See caveat 3 |
| Yahoo Mail | Partial See caveat 5 |
| Yahoo Mail Android | Partial See caveat 5 |
| Yahoo Mail iOS | Partial See caveat 5 |
| AOL Mail | Partial See caveat 5 |
| Superhuman | Untested |
Works in 6: Apple Mail, Apple Mail iOS, Samsung Mail and 3 more. Show all
| Client | Support |
|---|---|
| Apple Mail | Works |
| Apple Mail iOS | Works |
| Samsung Mail | Works |
| Thunderbird | Works |
| HEY Mail | Works |
| Fastmail | Works |
Caveats (5)
- 1. Gmail: Partial. Only supports
[attr~=value]syntax. Onlyclassas an attribute name is known to be supported. - 2. Gmail Android, Gmail iOS: Partial. Only supports
[attr~=value]syntax. Onlyclassas an attribute name is known to be supported. Partial. Doesn't work with non Google accounts. - 3. Outlook 365, Outlook (New), Outlook for Mac: Partial. Can not be used with a class selector (
.test[class]). Must be used solo ([class]) or with an element selector (td[class]). Partial. Only supports[attr],[attr=value],[attr~=value],[attr|=value]syntaxes. Buggy. Aclass="test"in the HTML is prefixedclass="x_test", but an attribute selector stays unprefixed[class="test"]. - 4. Outlook iOS, Outlook Android: Partial. Can not be used with a class selector (
.test[class]). Must be used solo ([class]) or with an element selector (td[class]). Partial. Only supports[attr],[attr=value],[attr~=value],[attr|=value]syntaxes. - 5. Yahoo Mail, Yahoo Mail Android, Yahoo Mail iOS, AOL Mail: Partial. Only supports
[attr=value]syntax.
Caveats as recorded by caniemail (MIT), one entry per wording.
How :attribute-selector behaves
Attribute selectors target elements based on their attributes (e.g., [type=email], [data-id="123"]). Email support is limited because many clients strip <style> blocks where these selectors live. When <style> blocks are preserved, attribute selectors work in modern clients but are ignored in Outlook Classic.
- Outlook strips <style> blocks, neutralizing attribute selectors.
- Gmail rewrites class names but preserves attribute selectors when <style> blocks survive.
- Apple Mail honors attribute selectors reliably across recent macOS and iOS releases.
Your next question
- Does :adjacent-sibling work in Outlook Classic?
Works in 16 of 21 · partial in 2 · not supported in 2 · 1 untested
- Does :child-combinator work in Outlook Classic?
Works in 16 of 21 · partial in 2 · not supported in 2 · 1 untested
- Does :general-sibling work in Outlook Classic?
Works in 16 of 21 · partial in 2 · not supported in 2 · 1 untested
- Does :universal-selector work in Outlook Classic?
Works in 16 of 21 · partial in 2 · not supported in 2 · 1 untested
- Does :chaining work in Outlook Classic?
Works in 14 of 21 · partial in 2 · not supported in 4 · 1 untested
- Does :first-child work in Outlook Classic?
Works in 12 of 21 · partial in 3 · not supported in 5 · 1 untested
Every feature in Outlook Classic · All email CSS features · What real installs show
Paste your email
Get new email CSS fixes by email.