4 ms·
That value name sounds weird to me. How is this "normal"? Why not call it grow-with-content for example? Is there a logic to calling this normal that I'm missin
by Aachen 3y ago
That value name sounds weird to me. How is this "normal"? Why not call it grow-with-content for example? Is there a logic to calling this normal that I'm missing?
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 :)
- notatoad 3y agothe irc log is here: https://github.com/w3c/csswg-drafts/issues/7542#issuecomment-1542505774 https://github.com/w3c/csswg-drafts/issues/7542#issuecomment... 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.
- ludwik 3y agoI think it feels weird and counterintuitive because `form-sizing: normal` looks as if it means, 'I want this to behave the way form elements behave by default' (i.e., use the normal form sizing). I would 100% expect `normal` to be the default value for `form-sizing`, as it usually is for other properties. Instead, if I understand correctly, this "normal" doesn't refer to the normal behavior of form elements but to the normal behavior of non-form elements. I would understand such logic if they had used `sizing: normal` instead. But for `form-sizing: normal` to not represent normal form sizing is just... weird.
- hanniabu 3y ago`form-sizing:grow` would definitely be more intuitive
- eyelidlessness 3y ago“Grow” has precedent in flex-grow, which in turn has the inverse flex-shrink. It would probably be even more confusing if the term grow were used here to mean grow and shrink.
- hanniabu 3y agoGood point, then maybe `form-sizing:auto`
- bfgeek 3y agoSuggestions for better names are welcome! Typically values with multiple words (e.g. grow-with-content) are rarely used. 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.
- kevinsync 3y ago"form-sizing: adaptive" or "form-sizing: flexible" make the most sense to me
- deleted 3y ago[deleted]
- notatoad 3y ago"form-sizing: content" would change it from something i probably have to look up every time i use it to something i might remember. 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
- deleted 3y ago[deleted]
- Reptur 3y agoI suggest: 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; }
- ludwik 3y ago> "normal" for the reason to "behave like a normal element". "auto" for "behave like before". 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).