正在加载视频...

视频加载失败

auto-growing <textarea> without JavaScript! CSS is getting field-sizing: content; to size inputs by their contents. Dropped in Chrome Canary today, demo here:

203,517 次观看 • 2 年前 •via X (Twitter)

9 条评论

Cory House 的头像
Cory House2 年前

Wow Wes I really like this video format. Super clear and mobile friendly. 👍

Wes Bos 的头像
Wes Bos2 年前

thanks a ton! Been about a year of playing with different layouts. It lends itself well to quick little tips without a ton of code

Wes Bos 的头像
Wes Bos2 年前

yeah! @stolinski used the popover API for do them on our site - and then I just used links

Jason 的头像
Jason2 年前

And people say CSS isn’t a real language. It’s magical

Kilian Valkhof 的头像
Kilian Valkhof2 年前

Impressive turnaround time there 😁 Also available in Polypane 17, released today 😎

Martin Elitzer 的头像
Martin Elitzer2 年前

Most awesome new css feature I've seen in a minute.

ELLIOT 的头像
ELLIOT2 年前

Woah, that would be so awesome. I had to deal with input auto-sizing a few days ago, and there literally was just horrible ways of doing it.

Rik Schennink 的头像
Rik Schennink2 年前

Nice! Hassle to do with JS. Could this, instead of introducing a new property, also work with: width: fit-content; height: fit-content; Haven’t tested but seems it should do the same?

Wes Bos 的头像
Wes Bos2 年前

Apparently it was considered, but not the exact same thing:

相关视频