Skip to main content
Emailens
CSS Functions

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

ClientCategoryEngineSupport
GmailwebmailGmail WebSupported
Gmail AndroidmobileGmail MobileSupported
Gmail iOSmobileGmail MobilePartialSee caveat 1
Outlook 365webmailOutlook WebSupported
Outlook (New)desktopOutlook WebUnsupported
Outlook ClassicdesktopMicrosoft WordUnsupported
Outlook iOSmobileOutlook MobilePartialSee caveat 2
Outlook AndroidmobileOutlook MobilePartialSee caveat 2
Outlook for MacdesktopWebKitSupported
Apple MaildesktopWebKitSupportedSee caveat 3
Apple Mail iOSmobileWebKitSupportedSee caveat 3
Yahoo MailwebmailYahooUnsupported
Yahoo Mail AndroidmobileYahooUnsupported
Yahoo Mail iOSmobileYahooUnsupported
Samsung MailmobileSamsungUnsupported
ThunderbirddesktopGeckoSupported
HEY MailwebmailWebKitSupported
Proton MailwebmailProtonSupportedSee caveat 3
AOL MailwebmailAOLUnsupported
FastmailwebmailFastmailSupported
SuperhumandesktopBlinkUnknown

Documented caveats (3)

  1. 1.Gmail iOS: Partial. Not supported with non Google accounts.
  2. 2.Outlook iOS, Outlook Android: Partial. Supports min-content and fit-content only.
  3. 3.Apple Mail, Apple Mail iOS, Proton Mail: Buggy. width: min-content acts as if word-break: break-all had 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.

Zero-Friction Engine Preview

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.