Either way I'm glad to see it! Can use this on a website of mine where it now switches just between small and large if people input more than one line :)
Either way I'm glad to see it! Can use this on a website of mine where it now switches just between small and large if people input more than one line :)
i had the same reaction, it seems like a very weird syntax. but after reading the discussion i get it: you're telling a form field to behave like a normal html element, instead of behaving like a form field. because normal elements grow to fit their content, and form fields not doing that is not normal.
This property will affect form-control elements <textarea> , <input> , <select> etc. Hence "form-sizing" but a better name for is definately welcome (please paint the bikeshed!).
"normal" for the reason to "behave like a normal element". "auto" for "behave like before".
Not great names, (perhaps "content" is better than "normal"?) but again, suggestions welcome.
i always have trouble with the css rules that describe an expectation, rather than describing an actual behaviour. i've only just finally got it into my head that setting "overflow:auto" means changing the overflow behaviour away from the default
Property: auto-resize
Values:
none: No auto-resizing.
horizontal: Auto-resizes horizontally based on content.
vertical: Auto-resizes vertically based on content.
both: Auto-resizes both horizontally and vertically based on content.
Usage:
textarea {
auto-resize: vertical;
}
input {
auto-resize: both;
}This seems backwards. In my mind "normal" sounds like "size this the way form elements are normally sized" (i.e., the default behavior), and "auto" sounds like "size this automatically" (i.e., based on the content).