La propriété CSS `field-sizing: content` permet d'ajuster la taille d'un `<textarea>` en fonction de son contenu, mais elle fonctionne également sur les `<input>` et `<select>`.

🔗 https://www.stefanjudis.com/today-i-learned/field-sizing-is-about-more-than-textareas/

#CSS #textarea #taille

field-sizing isn't only about growing textareas

The new field-sizing CSS property allows inputs, selects and textareas to grow depending on their content.

#Javascript #textarea
"textareaに入力した文字が増えた時に自動的に縦に伸びるコードはcssだけでは実現できないらしく、Javascriptが必要らしい。その為のコードをGeminiに教わったのだけど、外側にdivの枠があると、そのdivの高さを超えた場合にtextareaのスクロールバーだけでなく、その外側にdivのスクロールバーが現れて、見た目が悪いだけでなく使いにくくなる。そこで、Javascriptでtextareaが overflow:hidden; になるようにする。cssで overflow:hidden;にすると、Javascriptが無効な場合にスクロールバーが現れなくなるのでダメだそうだ。

 実験用のコードは次の通り。
"
textareaが自動的に縦に伸び縮みするJavascript
https://html-memo-hitorinezumi.blogspot.com/2025/10/autoResizeTextarea.html

textareaが自動的に縦に伸び縮みするJavascript

  textareaに入力した文字が増えた時に自動的に縦に伸びるコードはcssだけでは実現できないらしく、Javascriptが必要らしい。その為のコードをGeminiに教わったのだけど、外側にdivの枠があると、そのdivの高さを超えた場合にtextareaのスクロールバーだけ...

Pro tip: most users are unable to see invisible controls

Thanks @james_kirk for the picture

#Form #TextArea #InvisibleControls #Minimalism

Dear web form creators!When you provide a multiline <textarea> input field please do not squash my fondly edited paragraphs into one big mess of a single line.Why this is so awful you ask?- Bullet point lists get completely obliterated.- I intentionally split my text into meaningful paragraphs and you remove that context.- It’s extra dumb if you don’t add single spaces between those joined linesKind regardsYour users

#html #textarea #webdesign #webform #webforms

More freedom to choose your font size in the Bio/Text block

https://lnk.bio/linkin/more-freedom-to-choose-your-font-size-in-the-bio-text-block

Select your ideal text size while typing your biography

#linkinbio #textarea #typography

More freedom to choose your font size in the Bio/Text block

Select your ideal text size while typing your biography

CSS Solves Auto-Expanding Textareas (Probably, Eventually)

I’ll cut to the chase before I type too many more words: textarea { form-sizing: normal; } I came across it via an Amit Merchant blog post. Then followed the thread a little. It all started w…

Chris Coyier
Python - NiceGUI - Slider, input, textarea, markdown

YouTube