Skip to main content
The 2026 AI Readiness ReportRead it
The journal
Engineering·November 2026·7 min

CSS Form Control Styling Level 1 shipped field-sizing. The specification deserves more attention than the demos.

field-sizing: content reached Baseline Newly Available in June 2026 when Firefox 152 added support. It closes the textarea autosize pattern that front-end teams have been shipping in JavaScript for fifteen years. Reading the CSS Form Control Styling Level 1 specification reveals why the interaction with explicit dimensions matters and what the property does not cover.

SG
Sher Ghan
Principal AI Engineer
CSS Form Control Styling Level 1 shipped field-sizing. The specification deserves more attention than the demos.

Chrome's documentation for the property describes it in one phrase: 'field-sizing allows form controls to adjust their sizing to fit their content.' The CSS Form Control Styling Level 1 specification adds something that description does not: explicit dimensions, when present, take priority over content-based sizing along that axis. A textarea with a declared width of 300 pixels and field-sizing: content grows vertically but not horizontally. That is not a limitation of the implementation; it is a deliberate choice the specification makes about how content-based sizing interacts with the existing dimension model. It is also the detail most of the launch coverage missed.

The property reached Baseline Newly Available in June 2026 when Firefox 152 shipped support. Per web.dev's summary for that month, the minimum versions across major browsers are Chrome 123, Edge 123, Firefox 152, and Safari 26.2. Reading the specification closely produces a different understanding of what can safely be shipped and when than reading the launch articles does.

For roughly fifteen years, the approach to a growing textarea was a JavaScript event listener. The structure was always approximately the same: on input, set the element's height to auto, then immediately set it to the element's scrollHeight. Setting to auto first collapses the textarea before the measurement, which handles deletions correctly; without that step, the element can only grow. Some implementations used ResizeObserver rather than event listeners, which handled content changes that did not originate from user input. Libraries such as autosize and react-textarea-autosize appeared because the same listener code had been written enough times in enough projects to justify a package. The pattern worked reliably enough that it stopped being noticed.

The CSS Form Control Styling Level 1 specification appears to have emerged from a CSS Working Group issue opened in 2022, requesting that textarea be allowed to size to its contents. The specification generalised from that starting point to cover all HTML form controls: input, select, and the full range of interactive controls, not only textarea. That scope is wider than the original issue and wider than most of the tutorial coverage suggests, which has stayed focused on the textarea case.

What the specification says

The specification defines field-sizing with two values. fixed is the default: the control uses the browser's default preferred size, independent of its content, as it always has. content opts the control into content-based sizing. The property then interacts with the existing CSS dimension model according to one rule: an explicit fixed dimension on a given axis takes priority over content-based sizing on that axis. The min- and max- prefixed sizing properties constrain the available space but do not override content-based sizing; a min-height establishes a floor, and the control grows above that floor based on its content.

Four cases cover most of what a design system will encounter. A textarea with field-sizing: content and no explicit sizing at all grows without bound in both dimensions, which is rarely correct for a public form. A textarea with field-sizing: content and a declared width of 300 pixels grows only vertically, because the fixed width takes priority along the inline axis. A textarea with field-sizing: content, a min-height of 2lh, and a max-height of 20lh starts at two line-heights, grows to twenty, and scrolls thereafter. The lh unit, which measures the line-height of the element, is the right unit for height bounds on a form control: it stays correct if the font size changes, where a pixel value would not.

The property's interaction with explicit dimensions is not a gotcha; it is the specification doing exactly what it says. The confusion that will appear in pull request reviews is developers expecting field-sizing: content to override an explicitly set width, which it does not. If the textarea grows only vertically when both dimensions were expected to grow, the cause is a fixed width taking priority: often set at 100 per cent on a parent container, or inherited through a form's reset styles. The property is not broken. A fixed dimension is winning.

“The property's interaction with explicit dimensions is not a gotcha; it is the specification doing exactly what it says.”

What it closes and what it does not

For a component library that ships a growing textarea, the migration path is an @supports (field-sizing: content) query. The fallback branch attaches the existing JavaScript autosize handler. The @supports branch disables the overflow: hidden that the handler depends on, adds field-sizing: content, and sets a min-height to prevent the textarea collapsing when empty. The JavaScript handler should also check the same capability before attaching: CSS.supports('field-sizing', 'content') returns a boolean in any browser that implements the supports rule, and skipping the attachment in browsers that support the property means the interaction is delivered by the layout engine rather than by an event listener. The library code stays in the bundle while browser support windows remain mixed; the actual attachment becomes dead code in the browsers that matter most.

What field-sizing does not close is the broader category of container-responsive sizing. A design that requires the textarea to fill its container on wide viewports and fit its content on narrow ones needs max-width: 100% alongside field-sizing: content to limit content-based growth to the container's width. The property sizes to content, not to container. Teams that expect field-sizing: content alone to handle the full responsive case will encounter growth beyond the container boundary in layouts where container widths are not explicitly constrained.

The case most of the launch coverage skipped is select. With the fixed default, a select displays at the width of its currently selected value. With field-sizing: content, the select expands to show the longest option text, which is typically what a designer means when they say a select should fit its content. The same explicit dimension priority rule applies: a max-width limits the growth. A select that changes its selected value frequently will resize on each change, which requires verifying that the surrounding layout handles the width variation gracefully.

Baseline Newly Available is not permission to ship without a fallback. The WebDX group sets Widely Available status 2.5 years after Newly Available, which puts field-sizing at roughly December 2028. Teams maintaining support for recent browser release cycles will exclude Firefox 152 for at least another year; enterprise teams with managed browser environments may face a longer window. Progressive enhancement via @supports is not a temporary measure; it is the correct model for a property whose fallback is simply the existing default. Forms in older browsers will show fixed-size controls. That is exactly what they showed before this property existed.

There is a pattern in the history of the web platform where JavaScript solves a problem the CSS model cannot address, the solution stabilises into library code, and eventually a specification formalises what the library was already doing. position: sticky replaced a category of scroll listener. :focus-within replaced a focus event listener pattern. The autosize pattern has been stable and widespread for long enough that the CSSWG had a clear use case to specify against, and the specification reflects the pattern that production code had already found. The property model is narrow and the key sections are short; the interaction with explicit dimensions is the kind of detail that takes ten minutes to understand and several hours to debug if you first encounter it in production.

About the author

Sher Ghan

Principal AI Engineer

Every piece in the Journal is written personally by a senior practitioner, drawing on the engagement that motivated it. No ghostwriters, no content team, no models. If a paragraph here resonates with a problem you are looking at, the author is the person to reply to.

Get in touch with the practice