Hacker News new | ask | show | jobs
by bfgeek 994 days ago
Suggestions 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.

4 comments

"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

I 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;
  }
> "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).

"form-sizing: adaptive" or "form-sizing: flexible" make the most sense to me