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

I didn't realized we have previously discussed this - that's great!

I have a few concerns about overloading the by using the min-content / max-content keywords however.

1. It creates a slightly weird discontinuity between `height: auto` and `height: min-content`. E.g. the `auto` keyword effectively maps onto either `stretch` of `fit-content` within layout (depending on the context). There shouldn't be any difference between a `height:auto` (where `auto` maps to `fit-content`) and `height:min-content` to `height:fit-content`.

2. This is difficult to feature detect. E.g. it'll be difficult for web developers to test if this feature/mode is supported, and min-content/max-content/fit-content is widely supported.

3. Easy to get wrong when various algorithms request min-content/max-content sizing of different elements. 

The definition here will also need to be tweaked. Here you actually don't want it to be strictly the height of the content, rather you want to count the number of lines, then multiply that by the `lh` unit. The reason for this is that you'll get very subtle "glitches" when typing, e.g. type in a character that uses a font-fallback and has difference ascent/descent metrics, and the textarea will appear glitchy when typing.

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


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

Received on Sunday, 31 July 2022 23:29:59 UTC