fit-content
CSS function · 10 supported, 3 partial, 7 unsupported across 21 clients
10 of 21 email clients render fit-content fully (Sep 2, 2026 data); it breaks outright in Outlook (New), Outlook Classic, Yahoo Mail and 4 more.
- 5/7 webmail, 3/6 desktop, 2/8 mobile clients support fit-content fully.
- Unsupported in Outlook (New), Outlook Classic, Yahoo Mail, Yahoo Mail Android and 3 more.
- Partial in Gmail iOS, Outlook iOS, Outlook Android, behavior differs from browsers, test before relying on it.
- Outlook Classic (Word engine, supported to at least 2029) does not fully support fit-content, and its replacement changes little here; see the deprecation diff.
- Across all clients, only 6 of 298 tracked HTML/CSS features render identically everywhere.
Source: caniemail.com (MIT), via the Emailens engine. Last tested upstream Dec 31, 2022, synced by Emailens Sep 2, 2026.
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 | PartialSee caveat 1 |
| Outlook 365 | webmail | Outlook Web | Supported |
| Outlook (New) | desktop | Outlook Web | Unsupported |
| Outlook Classic | desktop | Microsoft Word | Unsupported |
| Outlook iOS | mobile | Outlook Mobile | PartialSee caveat 2 |
| Outlook Android | mobile | Outlook Mobile | PartialSee caveat 2 |
| Outlook for Mac | desktop | WebKit | Supported |
| Apple Mail | desktop | WebKit | SupportedSee caveat 3 |
| Apple Mail iOS | mobile | WebKit | SupportedSee caveat 3 |
| 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 | SupportedSee caveat 3 |
| AOL Mail | webmail | AOL | Unsupported |
| Fastmail | webmail | Fastmail | Supported |
| Superhuman | desktop | Blink | Unknown |
Documented caveats (3)
- 1.Gmail iOS: Partial. Not supported with non Google accounts.
- 2.Outlook iOS, Outlook Android: Partial. Supports
min-contentandfit-contentonly. - 3.Apple Mail, Apple Mail iOS, Proton Mail: Buggy.
width: min-contentacts as ifword-break: break-allhad been set on the element.
Caveats recorded by caniemail.com (MIT) and carried verbatim, one entry per wording rather than per client.
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
Check your own HTML for fit-content
Paste your own, or run the sample below. Analyzed in this page, with no signup and nothing stored.
Test your fit-content layout across 21 email clients
Preview rendering, catch CSS issues, and see how fit-content displays across Outlook, Gmail, and Apple Mail. Free, no account needed.
Instant live preview · No signup required · 21 email engines
Last tested upstream: · Last synced by Emailens:
caniemail.com (MIT) records Dec 31, 2022 as the last time fit-content was tested in a real client, 3 years before this sync. Syncing copies that result forward, it does not re-test it. Carried in @emailens/engine data v0.12.2.