max-content
`max-content` is the size content would like if it did not wrap at normal break points.
Another example
A command panel uses `max-content` for the shortcut column, so “⌘ Shift P” stays on one line. The command name uses `minmax(0,1fr)` and shortens only when the dialog reaches its viewport limit. A long translation cannot make the dialog wider than that limit.
Main parts
- 01Unwrapped content
- 02Preferred intrinsic size
- 03Outer size constraint
Use it when
Use it when one-line content matters and an outer limit keeps the box from growing too wide.
Do not use it when
Do not use it for long reading text, user-written text, or a box with no width limit. It may overflow the viewport.
Name used in code
width: max-content or a max-content grid track Before you ship
Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience.
Outcome: Use or define max-content to make the visual experience clear and easy to use. User context: A command panel uses `max-content` for the shortcut column, so “⌘ Shift P” stays on one line. The command name uses `minmax(0,1fr)` and shortens only when the dialog reaches its viewport limit. A long translation cannot make the dialog wider than that limit. Design concept to apply: max-content. Why it fits: Use it when one-line content matters and an outer limit keeps the box from growing too wide. Do not use it when: Do not use it for long reading text, user-written text, or a box with no width limit. It may overflow the viewport. Design requirements: Set the content order, shared design values, and reusable components. Define how the layout changes by screen size and state. Keep useful design choices separate from decoration. Inclusion and resilience: Check contrast, zoom, languages, themes, and reduced motion when needed. Do not use color or effects as the only way to show meaning. Acceptance criteria: The design stays clear on phones and desktops, at zoom, in every theme, and in all supported languages. Interactive states stay clear and consistent. Evidence and limits (evidence boundary): A formal document may still be a draft, release candidate, or final version. Check its status and browser or platform support. Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.
Check this request
Review the current use of max-content. Definition: `max-content` is the size content would like if it did not wrap at normal break points. Release checks: Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.