The CSSWG adopted a new CSS form-sizing property

By admin
It aims to solve the

age-old
DATE

frustration of running out of room when typing in a <textarea> element. We can already set the number of rows in a <textarea> directly in HTML:

<textarea rows="10">

Setting the initial size isn’t the issue, but what happens after the user has reached that threshold. It’s at that point where any text entered into the element that goes beyond that

10
CARDINAL

rows starts cutting off text at the top.

We might go so far as to consider this to be a form of

CSS
ORG

data loss.

That’s what the proposal for a new form-sizing property is all about, which the

CSSWG
ORG

approved back on

May 10, 2023
DATE

. The idea is that we can opt into

textareas
ORG

that are automatically sized by the content they contain:

/* Adjust sizing to content */ textarea { form-sizing: auto; } /* Normal behavior */ textarea { form-sizing: normal; }


Chrome
PERSON

appears to be the only browser currently working on the new property, at least in

Chrome Canary
LOC

. There’s a quiet ticket in

Firefox
ORG

, and nada that I could find in WebKit. Does that mean I’m obligated to file it?