VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

The Gold Standard of Websites | Separating field-sizing: content from Fixed Form-Control Sizing

Two empty text inputs share the same font and padding. The fixed control keeps its ordinary default preferred width. The content-sized control contracts toward the caret and placeholder or value behavior defined by the draft. Adding a long value grows only the content-sized control until a max-inline-size constraint caps it.

This lesson continues The Gold Standard of Websites, the Gold Standard of Education and the How X Works hub. Every input, textarea, select, value, placeholder and measured box is an original synthetic fixture. The lesson does not claim universal support, replace accessible labels, guarantee one size across fonts and languages or bypass explicit constraints and surrounding layout.

Record control type, value, placeholder, selected option, rows and cols or size attributes, field-sizing, writing mode, font state, box sizing, padding, borders, explicit size and min/max constraints, containing layout, scroll dimensions, measured content and border boxes, browser build and unsupported behavior.

The CSS Form Control Styling Module Level 1 defines styling hooks for form controls. Its field-sizing section defines fixed and content, default preferred sizes and the content-based intrinsic-sizing switch. This is a working draft, so supported elements, placeholder details and implementation behavior are verified rather than generalized.

THE GOLD STANDARD · WEBSITES

field-sizing chooses how the control obtains its preferred size; width, height and min/max constraints still participate afterward

Form controls such as inputs, textareas and selects often have host-language default preferred sizes. field-sizing: fixed keeps that ordinary sizing model. field-sizing: content asks the user agent to determine intrinsic size from the control’s content and ignore its default preferred size. It does not cancel an explicit width, height, min-width, max-width or layout constraint, and it does not turn one measurement into a permanent constant.

Fast route
Start with the decisive rule.
Start this route

Measurement route
Build the browser state and evidence ledger.
Start this route

Comparison route
Separate the nearest lookalikes.
Start this route

Transfer route
Change the context and retest.
Start this route

Reporting route
State limits and continue reading.
Start this route

Chapter contents

Open the full chapter index

1. Give fixed and content different jobs

fixed retains the ordinary default preferred-size model; content makes the control intrinsic size depend on its content and ignores that default preferred size.

Original worked example. Two otherwise identical inputs differ only in field-sizing and produce different preferred widths. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Add an explicit inline-size to both. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Record preferred-size source and final used size. If this check fails, mark the claim unavailable and repair the method before continuing.

Keep declared input, resolved platform state and final claim in separate fields so a matching screenshot cannot rewrite the mechanism.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Contents · Next chapter

2. Start from the correct control type

The property applies to elements with default preferred size under the draft. Different controls have different content models and sizing contributions.

Original worked example. A text input, textarea and select are tested in separate rows. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Replace the text input with a number input. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Keep control type and applicable content contribution explicit. If this check fails, mark the claim unavailable and repair the method before continuing.

Use a positive case, a clean negative case and an unavailable case. Unavailable means the required support or evidence was not established.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

3. Trace an empty control

With content sizing, an empty editable control still needs space for an insertion caret and defined internal behavior. Do not assume a mathematically zero width.

Original worked example. An empty content-sized input contracts to a small usable inline size. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Add one narrow character. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Measure content, padding and border boxes separately. If this check fails, mark the claim unavailable and repair the method before continuing.

Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

4. Separate placeholder from value

Placeholder text and actual value are distinct states. The draft and implementation determine which contributes to the preferred size; a screenshot cannot identify the source.

Original worked example. A long placeholder appears in an empty input, then a short value replaces it. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Remove the placeholder while keeping the value. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Log value, placeholder-shown state and width. If this check fails, mark the claim unavailable and repair the method before continuing.

Carry one plausible alternative through the ledger, then choose the next observation that separates it from the leading account.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

5. Let values change the intrinsic contribution

When content supplies preferred size, edits can grow or shrink the control. The surrounding layout and constraints still determine the final used result.

Original worked example. Typing Singapore grows an input; deleting to SG shrinks it. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Load a wider font without changing the string. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Record text metrics and each measured size. If this check fails, mark the claim unavailable and repair the method before continuing.

Name the relevant element, box, transition, scope, value or event. Similar visible results can come from different platform paths.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

6. Handle textarea lines

A textarea can size in both axes from content under the model, while wrapping couples inline size and block size. One long line and several short lines are not equivalent.

Original worked example. A fixed inline size makes five lines increase block size. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Remove the fixed width and add one unbroken token. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Capture line breaks, scroll dimensions and used axes. If this check fails, mark the claim unavailable and repair the method before continuing.

Archive source, fixture, declarations, state, events, browser version and raw exceptions so another reader can reproduce the conclusion.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

7. Keep explicit width and height authoritative

field-sizing does not erase explicit sizing declarations. A fixed inline-size can hold width while content affects the other axis or overflow.

Original worked example. A textarea has inline-size:20rem and field-sizing:content; its height follows line count. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Remove inline-size. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Store authored constraints before interpreting content growth. If this check fails, mark the claim unavailable and repair the method before continuing.

Keep declared input, resolved platform state and final claim in separate fields so a matching screenshot cannot rewrite the mechanism.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

8. Apply min and max constraints

Content-derived preferred size can be clamped by min-inline-size or max-inline-size. The intrinsic candidate and used size are different evidence.

Original worked example. A long input reaches max-inline-size:24rem and begins scrolling. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Raise the maximum to 32rem. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Record intrinsic candidate, clamp and overflow. If this check fails, mark the claim unavailable and repair the method before continuing.

Use a positive case, a clean negative case and an unavailable case. Unavailable means the required support or evidence was not established.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

9. Read select content as selection state

For a select, the currently presented option and control model influence content sizing. Counting every option string as one concatenated value is not a sound shortcut.

Original worked example. The selected label changes from SG to Republic of Singapore. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Add a longer unselected option only. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Log selected option, presentation mode and measured width. If this check fails, mark the claim unavailable and repair the method before continuing.

Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

10. Account for multiple select and size attributes

Multiple or listbox presentation has different geometry and author attributes. A single-select conclusion cannot be copied without establishing the applicable model.

Original worked example. A select changes from drop-down to size=5 listbox. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Toggle multiple while keeping options fixed. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Record mode, rows and selected options. If this check fails, mark the claim unavailable and repair the method before continuing.

Carry one plausible alternative through the ledger, then choose the next observation that separates it from the leading account.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

11. Respect writing modes

field sizing follows logical axes. In vertical writing, content length can affect the physical height rather than the horizontal width.

Original worked example. The same input runs in horizontal-tb and vertical-rl. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Change only writing mode. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Store logical and physical dimensions. If this check fails, mark the claim unavailable and repair the method before continuing.

Name the relevant element, box, transition, scope, value or event. Similar visible results can come from different platform paths.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

12. Include font loading

Content measurements depend on font metrics. A late web font can change a content-sized control without any value mutation.

Original worked example. The fallback font produces 188px; the loaded font produces 214px. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Reserve a system font with matching metrics. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Capture font readiness and measurement timestamps. If this check fails, mark the claim unavailable and repair the method before continuing.

Archive source, fixture, declarations, state, events, browser version and raw exceptions so another reader can reproduce the conclusion.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

13. Separate box model layers

Content-based preferred sizing does not mean getBoundingClientRect equals text width. Padding, borders, box-sizing and UA appearance contribute.

Original worked example. Text measures 96px while the border box is 124px. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Remove appearance and custom padding separately. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Show content, padding, border and outer geometry. If this check fails, mark the claim unavailable and repair the method before continuing.

Keep declared input, resolved platform state and final claim in separate fields so a matching screenshot cannot rewrite the mechanism.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

14. Test flex and grid constraints

A content-sized field remains a flex or grid item. Min-size rules, tracks and available space can override or redistribute its preferred contribution.

Original worked example. A growing field competes with a fixed button in a narrow flex row. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Set min-inline-size:0 on the field. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Record intrinsic contribution, free space and final allocation. If this check fails, mark the claim unavailable and repair the method before continuing.

Use a positive case, a clean negative case and an unavailable case. Unavailable means the required support or evidence was not established.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

15. Audit accessibility and zoom

A control that shrinks or grows must retain a visible label, usable target, readable content and stable focus under zoom and text enlargement.

Original worked example. At 200 percent zoom, max-inline-size prevents viewport overflow while the full value remains reachable. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Use a long localized label and keyboard-only editing. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Record focus ring, clipping, scroll access and accessible name. If this check fails, mark the claim unavailable and repair the method before continuing.

Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

16. Repair the auto-grow shortcut

field-sizing:content changes preferred sizing; it is not a promise of unlimited automatic growth or a replacement for overflow policy.

Original worked example. A textarea reaches max-block-size and then scrolls internally. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Remove the maximum and compare page reflow. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Name the constraint that stops growth. If this check fails, mark the claim unavailable and repair the method before continuing.

Carry one plausible alternative through the ledger, then choose the next observation that separates it from the leading account.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

17. Build a reproducible field ledger

Preserve control markup, attributes, value states, fonts, declarations, layout constraints, intrinsic candidates, used boxes and overflow.

Original worked example. The matrix covers empty, placeholder, short, long, multiline, selected option and unsupported cases. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. Repeat in a narrow grid and vertical writing mode. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Version the draft and browser. If this check fails, mark the claim unavailable and repair the method before continuing.

Name the relevant element, box, transition, scope, value or event. Similar visible results can come from different platform paths.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents · Next chapter

18. Use the forms draft and continue

CSS Form Control Styling defines the switch, while sizing, containment and ResizeObserver lessons own adjacent measurements.

Original worked example. The reading route follows control content, preferred-size source, constraints and rendered geometry. The objects, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.

Changed-context transfer. When supported controls or placeholder rules change, rerun every state. State what changed, predict the consequence and revise only the conclusion that depended on that condition.

Practical evidence check. Save exact source anchors, access date and raw measurements. If this check fails, mark the claim unavailable and repair the method before continuing.

Archive source, fixture, declarations, state, events, browser version and raw exceptions so another reader can reproduce the conclusion.

Before closing, reconcile the original fixture against the chapter rule: identify the relevant objects, state, event order or geometry and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, document or platform state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.

Previous chapter · Contents

Sources and further study

CSS Form Control Styling Module Level 1. Used for the standard definitions, material mechanisms or method limits developed in this lesson.

CSS Form Control Styling, field-sizing. Used for the standard definitions, material mechanisms or method limits developed in this lesson.

The worked examples and transfer checks are developed here and state their own assumptions. The linked sources support the underlying web-platform mechanisms, state and method limits.

Return to contents · Return to The Gold Standard of Websites