fit-content
CSS function · 7 supported, 3 partial, 4 unsupported across 15 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 |
| Apple Mail | desktop | WebKit | Supported |
| Apple Mail iOS | mobile | WebKit | Supported |
| Yahoo Mail | webmail | Yahoo | Unsupported |
| Samsung Mail | mobile | Samsung | Unsupported |
| Thunderbird | desktop | Gecko | Supported |
| HEY Mail | webmail | WebKit | Supported |
| Superhuman | desktop | Blink | Unknown |
Client-by-client behaviour for fit-content
Fully supports fit-content (7): Gmail, Gmail Android, Outlook 365, Apple Mail, Apple Mail iOS, Thunderbird, HEY Mail.
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 (4): Outlook (New), Outlook Classic, Yahoo Mail, Samsung 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.
Samsung 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 15 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.