Closed Bug 1832409 Opened 3 years ago Closed 1 month ago

[css-forms-1] Allow <input> / <textarea> to be sized by contents, via `field-sizing: fixed | content`

Categories

(Core :: Layout, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
152 Branch
Size Estimate S
Tracking Status
firefox152 --- fixed

People

(Reporter: mozilla-apprentice, Assigned: keithamus)

References

(Blocks 5 open bugs, )

Details

(Keywords: parity-chrome, parity-edge, parity-safari, Whiteboard: [platform-feature][webcompat:risk-moderate])

User Story

web-feature: field-sizing

A resolution was made for csswg-drafts/#7542.

[css-ui] ? Allow <textarea> to be sized by contents.

  • RESOLVED: Add a new property (provisionally "form-sizing: normal &124; auto") that turns off the "half-replaced" sizing of form controls and makes them content-based like normal elements

Discussion.

(In reply to Mozilla Apprentice from comment #0)

(provisionally "form-sizing: normal &124; auto"

(this was broken via some bot-copypasting-around encoding conversion; it should read:
form-sizing: normal | auto

(We should wait on spec text / finalized naming before diving too far into this. I think IanK is working on a prototype of this in Blink and he said it wasn't too much work, for what it's worth.)

Summary: [css-ui] ? Allow <textarea> to be sized by contents. → [css-ui] ? Allow <textarea> to be sized by contents, via `form-sizing: normal | auto`
Summary: [css-ui] ? Allow <textarea> to be sized by contents, via `form-sizing: normal | auto` → [css-ui] ? Allow <textarea> to be sized by contents, via `field-sizing: fixed | content`

This has changed to be field-sizing with values of fixed and content. See https://drafts.csswg.org/css-ui/#field-sizing

Summary: [css-ui] ? Allow <textarea> to be sized by contents, via `field-sizing: fixed | content` → [css-ui] Allow <input> / <textarea> to be sized by contents, via `field-sizing: fixed | content`
Assignee: nobody → lwarlow
Status: NEW → ASSIGNED
Depends on: 1901374
Depends on: 1901376
Depends on: 1901379
Type: defect → enhancement

Is there any ETA on this feature? It saves a lot of time in my use case and would like to avoid having to do a workaround for firefox.

Assignee: lwarlow → mozilla

WebKit has field-sizing enabled by default!!!
https://github.com/WebKit/WebKit/pull/45860

To clarify it has it enabled in preview only, the equivalent of if Firefox enabled something in nightly. It's not yet quite finished.

That said, Chrome does have this enabled, it landed in March of 2024, which means everything chrome-based also supports it, so Chrome, Edge, and Opera all support this feature. It's surprising that Firefox didn't add support for it too, given that it's been something we've all wanted for decades, ever since forms with an "other: ..." textarea hit the web =)

And reading through https://github.com/whatwg/html/issues/6807 it sounds like this is considered done on the working committee sides?

Keywords: parity-safari

Hi.
Could you please clarify the expected timeline for the full implementation of the CSS field-sizing property in Firefox? Additionally, could you specify from which Firefox version this feature will be available, even if initially behind an experimental flag?

Thank you very much for your assistance.

Depends on: 1977176
Depends on: 1977177

(In reply to Artem Kartavyy from comment #8)

Could you please clarify the expected timeline for the full implementation of the CSS field-sizing property in Firefox?

Keith, as assignee to this bug, maybe you can provide an ETA for this.

Additionally, could you specify from which Firefox version this feature will be available, even if initially behind an experimental flag?

It is already implemented behind the flag layout.css.field-sizing.enabled, though only for <select> elements, at the moment, see bug 1901379.

I've now created bug 1977176 and bug 1977177 to add support for it for <input> and <textarea> elements.

Sebastian

Flags: needinfo?(mozilla)

Keith, as assignee to this bug, maybe you can provide an ETA for this.

I don't have a specific timeline for this feature. I can confirm I won't get round to working on it this month. It is high on my list of priorities (but not at the top) so rest assured it'll be worked on in the coming months!

Flags: needinfo?(mozilla)

This feature moved to CSS Forms 1.

Sebastian

Blocks: css-forms-1
No longer blocks: css-ui-4
Summary: [css-ui] Allow <input> / <textarea> to be sized by contents, via `field-sizing: fixed | content` → [css-forms-1] Allow <input> / <textarea> to be sized by contents, via `field-sizing: fixed | content`
User Story: (updated)
Whiteboard: [platform-feature][webcompat:risk-moderate]
Size Estimate: --- → S
Blocks: 2006439

Hi team, any update on the ETA for field-sizing support on <input>/<textarea> (bugs 1977176 and 1977177)? Is this targeting a specific Firefox release?

Is there any update on the status of bugs 1977176 and 1977177? It's been 8 months since the patches were submitted on 1977176 with no resolution, and 1977177 remains unassigned.

Flags: needinfo?(dholbert)

I don't have concrete timing to share at the moment. This is in the list of features that we'd like to implement this year it we can get to it, but for the moment there's higher-priority work (fixing security bugs, front-loading our work on other web platform features that we've committed to as part of interop-2026 and other projects) that are currently occupying our engineering cycles.

It's been 8 months since the patches were submitted on 1977176

Those patches aren't yet finished, for what it's worth.

(Keith [assignee] might have more to share, but I suspect he'd say a version of what I just said.)

Flags: needinfo?(dholbert)
Depends on: 2036620

This is now enabled by default in nightly. Per https://groups.google.com/a/mozilla.org/g/dev-platform/c/bEjI1WY2teI we're targeting a 152 release, as 151 beta is already out.

Marking this as fixed. No need for relnote/devdoc as that's covered in https://bugzilla.mozilla.org/show_bug.cgi?id=2036620

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
No longer depends on: 1977177
You need to log in before you can comment on or make changes to this bug.