fit-content
CSS function · 10 supported, 3 partial, 7 unsupported across 21 clients
fit-content() returns a size that grows to its content but caps at a given maximum. It is used as both a sizing keyword and a function in modern CSS, and email support is limited , Apple Mail honors it, while Outlook and Gmail ignore it. For email, traditional table cell widths remain the most reliable sizing mechanism.
Client Support
| Client | Category | Engine | Support |
|---|---|---|---|
| Gmail | webmail | Gmail Web | Supported |
| Gmail Android | mobile | Gmail Mobile | Supported |
| Gmail iOS | mobile | Gmail Mobile | Partial |
| Outlook 365 | webmail | Outlook Web | Supported |
| Outlook (New) | desktop | Outlook Web | Unsupported |
| Outlook Classic | desktop | Microsoft Word | Unsupported |
| Outlook iOS | mobile | Outlook Mobile | Partial |
| Outlook Android | mobile | Outlook Mobile | Partial |
| Outlook for Mac | desktop | WebKit | Supported |
| Apple Mail | desktop | WebKit | Supported |
| Apple Mail iOS | mobile | WebKit | Supported |
| Yahoo Mail | webmail | Yahoo | Unsupported |
| Yahoo Mail Android | mobile | Yahoo | Unsupported |
| Yahoo Mail iOS | mobile | Yahoo | Unsupported |
| Samsung Mail | mobile | Samsung | Unsupported |
| Thunderbird | desktop | Gecko | Supported |
| HEY Mail | webmail | WebKit | Supported |
| Proton Mail | webmail | Proton | Supported |
| AOL Mail | webmail | AOL | Unsupported |
| Fastmail | webmail | Fastmail | Supported |
| Superhuman | desktop | Blink | Unknown |
Client-by-client behaviour for fit-content
Fully supports fit-content (10): Gmail, Gmail Android, Outlook 365, Outlook for Mac, Apple Mail, Apple Mail iOS, Thunderbird, HEY Mail, Proton Mail, Fastmail.
Partial support (3): Gmail iOS, Outlook iOS, Outlook Android. Expect rendering quirks unique to each engine. Partial support typically means a subset of values, an ignored shorthand, or sanitizer-specific rewrites.
No support (7): Outlook (New), Outlook Classic, Yahoo Mail, Yahoo Mail Android, Yahoo Mail iOS, Samsung Mail, AOL Mail. Plan fallbacks for these clients before relying on fit-content in production sends.
Behaviour unverified in: Superhuman.
When to use fit-content in email
- Sizing a button to its label without a fixed width.
- Fluid card sizing in modern-client-only layouts.
- Constraining a content block to its natural width while capping at a max.
Rendering behaviour and edge cases
- Outlook on Windows ignores fit-content() entirely.
- Apple Mail supports it in recent versions.
- Behavior on Gmail Web varies between Chromium versions.
Recommended fallback strategy
Use fit-content() only as progressive enhancement. Provide a fixed pixel width or a width attribute on table cells as the baseline so non-supporting clients still receive a sensible size.
Fixes & Workarounds
Outlook (New)
Unsupported"fit-content" is not supported in this email client.
Outlook Classic
Unsupported"fit-content" is not supported in this email client.
Yahoo Mail
Unsupported"fit-content" is not supported in this email client.
Yahoo Mail Android
Unsupported"fit-content" is not supported in this email client.
Yahoo Mail iOS
Unsupported"fit-content" is not supported in this email client.
Samsung Mail
Unsupported"fit-content" is not supported in this email client.
AOL Mail
Unsupported"fit-content" is not supported in this email client.
Gmail iOS
Partial"fit-content" is not supported in this email client.
Outlook iOS
Partial"fit-content" is not supported in this email client.
Outlook Android
Partial"fit-content" is not supported in this email client.
Related Features
Test your email across all 21 clients
Preview rendering, catch CSS issues, and get actionable fixes. Free.
Try Emailens FreeSupport data last updated Apr 27, 2026 · synced from caniemail.com via @emailens/engine.