- From: Luke Warlow via GitHub <sysbot+gh@w3.org>
- Date: Sun, 09 Mar 2025 11:52:10 +0000
- To: public-css-archive@w3.org
Something like the below styles will give you field-sizing: content behaviour but with a default width and height for textual inputs and textareas. These styles mostly match the existing intrinsic sizes (though they're based on the ch unit for a very specific microsoft font so it's only approximate). ```css textarea { field-sizing: content; width: 22ch; height: 2lh; } input:not([type=checkbox], [type=radio], [type=file], [type=color], [type=range]) { field-sizing: content; width: 20ch; } ``` With this authors can get the auto growing behaviour by doing something like: ```css textarea { height: auto; /* min-height max-height styles work to constrain size. */ } input:not([type=checkbox], [type=radio], [type=file], [type=color], [type=range]) { width: auto; /* min-width max-width styles work to constrain size. */ } ``` -- GitHub Notification of comment by lukewarlow Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11838#issuecomment-2708818093 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 9 March 2025 11:52:11 UTC