Re: [csswg-drafts] [css-ui] ? Allow <textarea> to be sized by contents. (#7542)

> Wouldn't you usually be using `height` here, so `min-height: 1lh;` is still available? That is, `textarea { form-sizing: auto; min-height: 1lh; }` would do what you want, right? Are there cases where you need to use `height` for some other value, but still want to restrict it to a minimum size expressed both in terms of content and an explicit length? (I could maybe see this, with a `height: 100%` perhaps? I think you could shuffle them around then, tho, with a `height: auto; min-height: max(1lh, 100%);`.)
> 
> If we do have such cases, is it actually form-specific, or is it a more general issue with wanting to apply multiple min/max constraints to an arbitrary element? If the latter, we should handle it in a generic way, such as by making min/max take a comma-separated list of constraints.

Yes, I'd expect `min-height` to be available, this is not about applying multiple constraints. None of this is particularly hard, it's just that authors need to remember to do it, and the UX without it is pretty terrible. Boilerplate in general is kind of an API smell (though sometimes unavoidable).

Of course, if we define it as a new value, I suppose it could have the reasonable minimum baked in. Are there any use cases where you *don't* want that minimum?

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7542#issuecomment-1536309793 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 5 May 2023 14:02:37 UTC