The max-inline-size property sets a maximum size on the inline axis. In the default horizontal writing mode it behaves like max-width. In a vertical writing mode it behaves like max-height.
The box can stay smaller than the limit. It cannot grow past the ceiling on that axis. Pair it with inline-size and min-inline-size for full logical sizing. The other axis uses max-block-size.
Standard-track.
Not deprecated. Part of CSS Logical Properties. Length, percentage, and none are Baseline. Intrinsic keywords are widely supported; stretch is newer and limited.
Limited support stretch
The stretch keyword for max-inline-size is not ready for everyday use. Prefer lengths, percentages, or none.
Flip the axis.writing-mode: vertical-rl makes lines run top to bottom.
Inline becomes vertical. So max-inline-size now maps to max-height.
Same property name. You did not switch to max-height; the logical name followed the writing mode.
Why it matters. One rule can work for horizontal and vertical layouts without rewriting physical sizes.
Example 3 — No Cap vs Cap
Compare free growth with a hard ceiling on the same text.
CSS
<style>
.free {
max-inline-size: none;
}
.capped {
max-inline-size: 12rem;
}
</style>
<p class="free">Grows with the container.</p>
<p class="capped">Stops at 12rem on the inline axis.</p>
Add a ceiling.12rem stops growth along the inline axis.
Text still wraps. The capped box wraps words instead of becoming wider.
Logical twin of max-width. In horizontal writing these two look the same; they diverge when writing mode changes.
Edge Cases & Pitfalls
Most confusion comes from mixing logical and physical size properties.
axis
Writing mode changes the mapped side
Horizontal: acts like max-width. Vertical: acts like max-height. Check writing-mode before debugging.
physical
Do not mix casually with max-width
Setting both can fight. Pick logical sizing for portable layouts, or physical sizing when you truly mean horizontal only.
percent
Percentage uses the parent’s inline size
50% is half of the containing block’s inline size. In vertical writing that parent size is height-oriented.
ie
Internet Explorer has no support
IE never shipped logical sizing. Use max-width as a fallback only if you still need that browser.
pair
Remember the block-axis twin
Cap the other dimension with max-block-size. Together they replace max-width + max-height in logical layouts.
Compatibility
Browser Support
max-inline-size is a browser layout property. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
max-inline-size
Chrome 57+, Firefox 41+, Safari 12.1+, Edge 79+. Internet Explorer has no support. Intrinsic keywords are widely supported; stretch is limited.
97%Common values
Google Chrome57+
Full
Mozilla Firefox41+
Full
Apple Safari12.1+
Full
Microsoft Edge79+
Full
Opera44+
Full
Samsung Internet7+
Full
Internet ExplorerNo support
None
max-inline-sizeWidely supported
Bottom line: Safe for modern sites. Fall back to max-width only if you must support Internet Explorer. Treat stretch as progressive enhancement.
Remember
Key Takeaways
Role: set a ceiling on the inline axis, following writing mode.
Maps to:max-width (horizontal) or max-height (vertical).
Initial value:none. Not inherited.
Best use: readable columns and writing-mode-aware components.
One line:max-inline-size is a logical ceiling — width in horizontal writing, height in vertical writing.
Frequently Asked Questions
It sets a maximum size on the inline axis. In horizontal writing that usually caps width. In vertical writing it caps height instead.
The initial value is none, which means there is no maximum on the inline axis. The element can grow with its content and container.
max-width always limits horizontal size. max-inline-size follows writing-mode: it maps to max-width in horizontal-tb and to max-height in vertical writing modes.
Use it for readable text columns, cards, and components that should stay portable across writing modes. Prefer max-width only when you truly mean physical horizontal size.
No. Use max-width as a fallback if you must support IE. Modern Chromium Edge, Firefox, Safari, and Chrome all support it.
It is Baseline and widely available: Chrome 57+, Firefox 41+, Safari 12.1+, Edge 79+. It is a browser layout property, not a Node.js feature.